Merge pull request #4263 from omnivore-app/fix/web-library-refetch

Set a stale time to try to prevent over fetching
This commit is contained in:
Jackson Harper
2024-08-14 13:09:15 +08:00
committed by GitHub

View File

@ -230,8 +230,10 @@ export function useGetLibraryItems(
return response.search
},
enabled,
refetchOnMount: false,
initialPageParam: '0',
refetchOnMount: false,
refetchOnWindowFocus: false,
staleTime: 10 * 60 * 1000,
getNextPageParam: (lastPage: LibraryItems) => {
return lastPage.pageInfo.hasNextPage
? lastPage?.pageInfo?.endCursor