Refetch some data on an interval (#2114)
* Match refetch intervals to stale time * Lower refetch interval for own-profile
This commit is contained in:
parent
47771b9066
commit
a924df4dcd
5 changed files with 17 additions and 4 deletions
|
|
@ -15,7 +15,8 @@ export type InviteCodesQueryResponse = Exclude<
|
|||
>
|
||||
export function useInviteCodesQuery() {
|
||||
return useQuery({
|
||||
staleTime: STALE.HOURS.ONE,
|
||||
staleTime: STALE.MINUTES.FIVE,
|
||||
refetchInterval: STALE.MINUTES.FIVE,
|
||||
queryKey: ['inviteCodes'],
|
||||
queryFn: async () => {
|
||||
const res = await getAgent()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue