Skip to content

Commit

Permalink
[#178] Fix: 언마운트 후 재마운트 시 infiniteQuery 버그 fix (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjc2021 authored Mar 19, 2024
1 parent 713b055 commit 87cc439
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/api/zzal/useGetHomeZzals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useGetHomeZzlas = () => {
return lastPageParam + 1;
},
initialPageParam: 0,
refetchOnMount: false,
});

const handleFetchNextPage = () => {
Expand All @@ -26,10 +27,10 @@ const useGetHomeZzlas = () => {

return {
zzals: data?.pages.flatMap((page) => page),
handleFetchNextPage,
hasNextPage,
isFetchingNextPage,
fetchNextPage,
handleFetchNextPage,
...rest,
};
};
Expand Down
1 change: 1 addition & 0 deletions src/hooks/api/zzal/useGetMyLikedZzals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useGetMyLikedZzals = () => {
return lastPageParam + 1;
},
initialPageParam: 0,
refetchOnMount: false,
});

const handleFetchNextPage = () => {
Expand Down
1 change: 1 addition & 0 deletions src/hooks/api/zzal/useGetMyUploadedZzals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useGetMyUploadedZzals = () => {
return lastPageParam + 1;
},
initialPageParam: 0,
refetchOnMount: false,
});

const handleFetchNextPage = () => {
Expand Down

0 comments on commit 87cc439

Please sign in to comment.