about summary refs log tree commit diff
path: root/src/state/queries/preferences/index.ts
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-06 14:31:54 -0600
committerGitHub <noreply@github.com>2023-12-06 12:31:54 -0800
commita924df4dcd87b9963699643d04475dc89c926633 (patch)
treef921f6dd4a0273cebdeffcd5b2351640f532b01c /src/state/queries/preferences/index.ts
parent47771b906658d56106c7e78efcd46524eebfb358 (diff)
downloadvoidsky-a924df4dcd87b9963699643d04475dc89c926633.tar.zst
Refetch some data on an interval (#2114)
* Match refetch intervals to stale time

* Lower refetch interval for own-profile
Diffstat (limited to 'src/state/queries/preferences/index.ts')
-rw-r--r--src/state/queries/preferences/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state/queries/preferences/index.ts b/src/state/queries/preferences/index.ts
index 620d56862..872bb21af 100644
--- a/src/state/queries/preferences/index.ts
+++ b/src/state/queries/preferences/index.ts
@@ -28,8 +28,9 @@ export const preferencesQueryKey = ['getPreferences']
 
 export function usePreferencesQuery() {
   return useQuery({
-    staleTime: STALE.MINUTES.ONE,
+    staleTime: STALE.SECONDS.FIFTEEN,
     structuralSharing: true,
+    refetchInterval: STALE.SECONDS.FIFTEEN,
     queryKey: preferencesQueryKey,
     queryFn: async () => {
       const agent = getAgent()