fix: cache time infinite

attempt fixing issues with cache becoming undefined
This commit is contained in:
cv
2021-05-20 08:31:34 +02:00
parent 78cdcb2aa4
commit 34481b57c6
+1 -1
View File
@@ -4,7 +4,7 @@ const refetchIntervalMs = 10000;
export const useFetch = (namespace, fn) => {
const { data, status, isError, refetch } = useQuery(namespace, fn, {
refetchInterval: refetchIntervalMs,
cacheTime: refetchIntervalMs,
cacheTime: Infinity,
});
return { data, status, isError, refetch };