mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
no more stale swr any longer
This commit is contained in:
@@ -56,10 +56,11 @@ export function useProtectedSWRInfinite(path: string = '') {
|
|||||||
return [`/api?path=${path}&next=${previousPageData.next}`, hashedToken]
|
return [`/api?path=${path}&next=${previousPageData.next}`, hashedToken]
|
||||||
}
|
}
|
||||||
|
|
||||||
const revalidationOptions = {
|
// const revalidationOptions = {
|
||||||
revalidateOnMount: !(cache.has(`arg@"/api?path=${path}"@null`) || cache.has(`/api?path=${path}`)),
|
// revalidateOnMount: !(cache.has(`arg@"/api?path=${path}"@null`) || cache.has(`/api?path=${path}`)),
|
||||||
revalidateOnFocus: false,
|
// revalidateOnFocus: false,
|
||||||
revalidateOnReconnect: true,
|
// revalidateOnReconnect: true,
|
||||||
}
|
// }
|
||||||
return useSWRInfinite(getNextKey, fetcher, revalidationOptions)
|
// return useSWRInfinite(getNextKey, fetcher, revalidationOptions)
|
||||||
|
return useSWRInfinite(getNextKey, fetcher)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user