diff --git a/src/bookmarks/service/hooks/home/useBookmarkList.tsx b/src/bookmarks/service/hooks/home/useBookmarkList.tsx index 399c44e5..ab9ba34c 100644 --- a/src/bookmarks/service/hooks/home/useBookmarkList.tsx +++ b/src/bookmarks/service/hooks/home/useBookmarkList.tsx @@ -17,7 +17,7 @@ const useBookmarkList = ({ categoryId, }: BookmarkListProps) => { const navigate = useLocation(); - const { userInfo } = useAuthStore(); + const { memberId: loginId } = useAuthStore(); // SERVER // 1. 북마크 리스트 조회 const { @@ -30,7 +30,7 @@ const useBookmarkList = ({ readByUser, categoryId, memberId, - loginId: userInfo?.id, + loginId, }); useEffect(() => { diff --git a/src/bookmarks/ui/Main/BookmarkListView.tsx b/src/bookmarks/ui/Main/BookmarkListView.tsx index 5a017e93..4afd065d 100644 --- a/src/bookmarks/ui/Main/BookmarkListView.tsx +++ b/src/bookmarks/ui/Main/BookmarkListView.tsx @@ -34,7 +34,7 @@ const BookmarkListView = ({ const { bottom } = useBottomIntersection({ fetchNextPage, - enabled: !isFetchingNextPage, + enabled: !isFetchingNextPage && memberId !== 0, }); const flatBookMarkList = bookMarkList?.pages.flatMap((page) => page.contents); diff --git a/src/notification/api/notification.ts b/src/notification/api/notification.ts index a9a1c9cf..477f057b 100644 --- a/src/notification/api/notification.ts +++ b/src/notification/api/notification.ts @@ -65,8 +65,14 @@ export const GET_NOTIFICATION_LIST_KEY = (params: GetAPIRequest) => [ ]; export const useGETNotificationListQuery = (params: GetAPIRequest) => { - return useQuery(GET_NOTIFICATION_LIST_KEY(params), async () => - getNotificationListAPI(params), + return useQuery( + GET_NOTIFICATION_LIST_KEY(params), + async () => getNotificationListAPI(params), + { + enabled: params.memberId !== 0, + cacheTime: 10 * 60 * 1000, + staleTime: 10 * 60 * 1000, + }, ); };