Skip to content

Commit

Permalink
#109 fix: 추천친구가 뜨지 않는 오류로 queryKey 이름 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
MyungJiwoo committed Nov 14, 2024
1 parent 3090a02 commit 7f9562a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useFollowersList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const useSearchFriendsList = (keyword: string, page: number, size: number

export const useRecommendFriendsList = (page: number, size: number) => {
return useQuery<FollowersListData | null>({
queryKey: ['followersList', page, size],
queryKey: ['recommendedFriendsList', page, size],
queryFn: () => getRecommendedFriendsList(page, size),
staleTime: 1000 * 60 * 5,
});
Expand Down
4 changes: 2 additions & 2 deletions src/pages/ConnectionsPage/ConnectionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const ConnectionsPage = () => {
const navigate = useNavigate();
const [currentPage, setCurrentPage] = useState<number>(0);

const { data: followersList } = useFollowersList(currentPage, 8);
const { data: recommendList } = useRecommendFriendsList(currentPage, 8);
const { data: followersList } = useFollowersList(currentPage, 6);
const { data: recommendList } = useRecommendFriendsList(0, 8);

// * 페이지네이션 페이지 변경 감지 함수
const handleChangePage = (event: React.ChangeEvent<unknown>, value: number) => {
Expand Down

0 comments on commit 7f9562a

Please sign in to comment.