{
+ const calc = e.target.scrollHeight - e.target.offsetHeight;
+ if (e.target.scrollTop === calc) {
+ setScrollPos(({ start, end }) => {
+ return { start, end: true };
+ });
+ } else if (e.target.scrollTop === 0) {
+ setScrollPos(({ start, end }) => {
+ return { start: true, end };
+ });
+ } else {
+ setScrollPos(() => {
+ return { start: false, end: false };
+ });
+ }
+ }}
+ >
+ {sentRequests && (
+
+
+
Requests
+
+ {sentRequests.map((request, i) => {
+ return (
+
+
+
+
+
+
+ {request.name}
+
+
+
+
+
+
{request.name}
+
{request.bio}
+
+
+
+
+
+
+
+
+
+ );
+ })}
+
+ )}
+ {receivedRequests && (
+
+
+
Pending
+
+ {receivedRequests.map((request, i) => {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
{request.name}
+
{request.bio}
+
+
+
{request.name}
+
pending
+
+
+
+
+
+
+ );
+ })}
+
+ )}
+