Skip to content

Commit

Permalink
chore: separate useEffect calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-stumpf committed Nov 21, 2024
1 parent 83f3260 commit 42fb878
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/explorer/components/InfiniteScrollGuilds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ export const InfiniteScrollGuilds = () => {
}, [resetIsIntersected, isFetchingNextPage]);

useEffect(() => {
if (isFetchingNextPage || isLoading) return;
if (isFetchingNextPage) return;
if (isIntersected && hasNextPage) {
fetchNextPage();
}
console.log("what", { isLoading, isFetchingNextPage });
}, [isIntersected, hasNextPage, isFetchingNextPage, fetchNextPage]);

const guilds = data?.pages.flatMap((page) => page.items) || [];
Expand Down

0 comments on commit 42fb878

Please sign in to comment.