diff options
Diffstat (limited to 'src/state/queries/post-feed.ts')
-rw-r--r-- | src/state/queries/post-feed.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/state/queries/post-feed.ts b/src/state/queries/post-feed.ts index 7847c7202..efdb42dd2 100644 --- a/src/state/queries/post-feed.ts +++ b/src/state/queries/post-feed.ts @@ -291,7 +291,13 @@ export function usePostFeedQuery( } } - if (!isFetching && hasNextPage && count < PAGE_SIZE && numEmpties < 3) { + if ( + !isFetching && + hasNextPage && + count < PAGE_SIZE && + numEmpties < 3 && + (data?.pages.length || 0) < 6 + ) { query.fetchNextPage() } }, [query]) |