From ac8381d11466c218775142d7edbc1e0fe1ad8638 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 18 Jun 2024 19:34:35 +0800 Subject: [PATCH] feat: only set refetchInterval for entries --- src/renderer/src/lib/query-client.ts | 1 - src/renderer/src/queries/entries.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/lib/query-client.ts b/src/renderer/src/lib/query-client.ts index bc3275b26b..df8ea815aa 100644 --- a/src/renderer/src/lib/query-client.ts +++ b/src/renderer/src/lib/query-client.ts @@ -8,7 +8,6 @@ const queryClient = new QueryClient({ defaultOptions: { queries: { gcTime: Infinity, - refetchInterval: 1000 * 60 * 10, retryDelay: 1000, retry(failureCount, error) { console.error(error) diff --git a/src/renderer/src/queries/entries.ts b/src/renderer/src/queries/entries.ts index cd7079b037..09223734f9 100644 --- a/src/renderer/src/queries/entries.ts +++ b/src/renderer/src/queries/entries.ts @@ -72,6 +72,7 @@ export const useEntries = ({ return lastPage.data.at(-1)!.entries.publishedAt }, initialPageParam: undefined, + refetchInterval: 1000 * 60 * 10, }) export const useEntriesPreview = ({ id }: { id?: string }) =>