Stale time to 30m
This commit is contained in:
@@ -6,6 +6,7 @@ export const STALE = {
|
||||
MINUTES: {
|
||||
ONE: 1e3 * 60,
|
||||
FIVE: 1e3 * 60 * 5,
|
||||
THIRTY: 1e3 * 60 * 30,
|
||||
},
|
||||
HOURS: {
|
||||
ONE: 1e3 * 60 * 60,
|
||||
|
||||
@@ -4,6 +4,7 @@ import {useQuery} from '@tanstack/react-query'
|
||||
|
||||
// TEMP
|
||||
import {makeSearchLink} from '#/lib/routes/links'
|
||||
import {STALE} from '#/state/queries'
|
||||
import {usePreferencesQuery} from '#/state/queries/preferences'
|
||||
|
||||
export type TrendingTopic = {
|
||||
@@ -24,6 +25,8 @@ export function useTrendingTopics() {
|
||||
}, [preferences?.moderationPrefs])
|
||||
|
||||
return useQuery({
|
||||
refetchOnWindowFocus: true,
|
||||
staleTime: STALE.MINUTES.THIRTY,
|
||||
queryKey: trendingTopicsQueryKey,
|
||||
async queryFn() {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user