Skip to content

Commit

Permalink
hasMore 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
guswl98 committed Aug 8, 2024
1 parent 6645ff6 commit a2f6adb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,15 @@ export default function useFetchImages() {
size: size - response.data.length,
categoryOrder,
})
: { data: [], total: totalPoiReviewImagesCount }
: { data: [], total: totalPoiReviewImagesCount, next: null }
return {
...response,
data: [...response.data, ...poiReviewsResponse.data],
total: response.total + poiReviewsResponse.total,
next:
poiReviewsResponse.data.length > 0
? poiReviewsResponse.next
: response.next,
}
}
const response = await fetchPoiReviewImages(target, {
Expand Down

0 comments on commit a2f6adb

Please sign in to comment.