mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use staleTime
This commit is contained in:
parent
f80570a1ac
commit
541aa859d2
2 changed files with 2 additions and 4 deletions
|
|
@ -827,7 +827,7 @@ export function LibraryContainer(props: LibraryContainerProps): JSX.Element {
|
|||
<Box
|
||||
key={item.node.id}
|
||||
onClick={() => {
|
||||
router.push(`${viewerData?.profile.username}/${item.node.slug}`)
|
||||
router.push(`/${viewerData?.profile.username}/${item.node.slug}`)
|
||||
}}
|
||||
>
|
||||
{item.cursor}: {item.node.title}
|
||||
|
|
|
|||
|
|
@ -235,9 +235,7 @@ export function useGetLibraryItems(
|
|||
},
|
||||
enabled,
|
||||
initialPageParam: '0',
|
||||
refetchOnMount: false,
|
||||
refetchOnReconnect: false,
|
||||
refetchOnWindowFocus: false,
|
||||
staleTime: 10_000,
|
||||
getNextPageParam: (lastPage: LibraryItems, pages) => {
|
||||
return lastPage.pageInfo.hasNextPage
|
||||
? lastPage?.pageInfo?.endCursor
|
||||
|
|
|
|||
Loading…
Reference in a new issue