about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/state/queries/index.ts17
-rw-r--r--src/state/queries/trending/useTrendingTopics.ts2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/state/queries/index.ts b/src/state/queries/index.ts
index d4b9d94c4..cdc47bf99 100644
--- a/src/state/queries/index.ts
+++ b/src/state/queries/index.ts
@@ -1,15 +1,20 @@
+const SECOND = 1e3
+const MINUTE = SECOND * 60
+const HOUR = MINUTE * 60
+
 export const STALE = {
   SECONDS: {
-    FIFTEEN: 1e3 * 15,
-    THIRTY: 1e3 * 30,
+    FIFTEEN: 15 * SECOND,
+    THIRTY: 30 * SECOND,
   },
   MINUTES: {
-    ONE: 1e3 * 60,
-    FIVE: 1e3 * 60 * 5,
-    THIRTY: 1e3 * 60 * 30,
+    ONE: MINUTE,
+    THREE: 3 * MINUTE,
+    FIVE: 5 * MINUTE,
+    THIRTY: 30 * MINUTE,
   },
   HOURS: {
-    ONE: 1e3 * 60 * 60,
+    ONE: HOUR,
   },
   INFINITY: Infinity,
 }
diff --git a/src/state/queries/trending/useTrendingTopics.ts b/src/state/queries/trending/useTrendingTopics.ts
index 310f64e9f..6d3580a8f 100644
--- a/src/state/queries/trending/useTrendingTopics.ts
+++ b/src/state/queries/trending/useTrendingTopics.ts
@@ -22,7 +22,7 @@ export function useTrendingTopics() {
 
   return useQuery({
     refetchOnWindowFocus: true,
-    staleTime: STALE.MINUTES.THIRTY,
+    staleTime: STALE.MINUTES.THREE,
     queryKey: trendingTopicsQueryKey,
     async queryFn() {
       const {data} = await agent.api.app.bsky.unspecced.getTrendingTopics({