Skip to content

Commit

Permalink
[fix] 무한스크롤 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Hj1218 committed Aug 17, 2024
1 parent d13db1c commit 9813d23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/diary/queries/useFetchKeywordPhotos.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const useFetchKeywordPhotos = (keyword) => {
});
return response.data.result;
},
getNextPageParam: (lastPage, allPages) => {
return lastPage.imgUrls.length > 0 ? allPages.length + 1 : undefined;
getNextPageParam: (lastPage) => {
return lastPage.hasNextPage;
},
enabled: !!keyword,
});
Expand Down

0 comments on commit 9813d23

Please sign in to comment.