Feed bugfixes (#2204)
* Dont show both an error and empty message in the feed * Add a sanity check when attempting to fill the first 30
This commit is contained in:
@@ -114,7 +114,13 @@ export function useNotificationFeedQuery(opts?: {enabled?: boolean}) {
|
||||
count += page.items.length
|
||||
}
|
||||
|
||||
if (!isFetching && hasNextPage && count < PAGE_SIZE && numEmpties < 3) {
|
||||
if (
|
||||
!isFetching &&
|
||||
hasNextPage &&
|
||||
count < PAGE_SIZE &&
|
||||
numEmpties < 3 &&
|
||||
(data?.pages.length || 0) < 6
|
||||
) {
|
||||
query.fetchNextPage()
|
||||
}
|
||||
}, [query])
|
||||
|
||||
Reference in New Issue
Block a user