From 2a4c9adb484bf841917da925c905f53cc1894b94 Mon Sep 17 00:00:00 2001 From: hyeseon han Date: Fri, 23 Feb 2024 23:33:33 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=EC=B9=9C=EA=B5=AC=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20API=20profileImage=20Enum=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EA=B0=92=20=EC=B6=94=EA=B0=80=20=EB=8C=80?= =?UTF-8?q?=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/organisms/FriendListItem.tsx | 3 +-- src/types/friendship/index.d.ts | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/organisms/FriendListItem.tsx b/src/components/organisms/FriendListItem.tsx index 852733c..7e39dc9 100644 --- a/src/components/organisms/FriendListItem.tsx +++ b/src/components/organisms/FriendListItem.tsx @@ -14,9 +14,8 @@ const FriendListItem: React.FC<{ return (
- {/* TODO profile img ENUM res 데이터로 교체 */} Date: Fri, 23 Feb 2024 23:33:50 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=EC=B9=9C=EA=B5=AC=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20=EB=AC=B4=ED=95=9C=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/templates/FriendListTemplate.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/templates/FriendListTemplate.tsx b/src/components/templates/FriendListTemplate.tsx index 82a3bf2..21e614d 100644 --- a/src/components/templates/FriendListTemplate.tsx +++ b/src/components/templates/FriendListTemplate.tsx @@ -37,7 +37,7 @@ const FriendListTemplate: React.FC<{ possibleDelete: boolean }> = ({ const [selectedFriendIds, setSelectedFriendIds] = useState([]); const { data: friendsData, - fetchNextPage: friendsNextPage, + fetchNextPage: fetchFriendsNextPage, isFetchingNextPage: isFetchingfriendsNextPage, refetch: friendsRefetch, } = useGetFriendships({ @@ -53,7 +53,7 @@ const FriendListTemplate: React.FC<{ possibleDelete: boolean }> = ({ const onIntersect: IntersectionObserverCallback = ([entry]) => { if (entry.isIntersecting) { - void friendsNextPage(); + void fetchFriendsNextPage(); } }; @@ -116,10 +116,13 @@ const FriendListTemplate: React.FC<{ possibleDelete: boolean }> = ({ /> )), )} + {isFetchingfriendsNextPage ? ( + + ) : ( +
+ )}
- {isFetchingfriendsNextPage ? :
} -
-
-
+ {possibleDelete ? ( +
+
+ ) : null}