Reduce stale time for join link preview queries (#10733)
This commit is contained in:
@@ -83,7 +83,7 @@ export function usePrefetchJoinLinkPreviews() {
|
|||||||
return queryClient.prefetchQuery({
|
return queryClient.prefetchQuery({
|
||||||
queryKey: createJoinLinkPreviewQueryKey({codes, hasSession}),
|
queryKey: createJoinLinkPreviewQueryKey({codes, hasSession}),
|
||||||
queryFn: () => fetchJoinLinkPreviews({agent, codes, hasSession}),
|
queryFn: () => fetchJoinLinkPreviews({agent, codes, hasSession}),
|
||||||
staleTime: STALE.MINUTES.ONE,
|
staleTime: STALE.SECONDS.FIFTEEN,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ export function useGetJoinLinkPreview() {
|
|||||||
queryKey: createJoinLinkPreviewQueryKey({codes: [code], hasSession}),
|
queryKey: createJoinLinkPreviewQueryKey({codes: [code], hasSession}),
|
||||||
queryFn: () =>
|
queryFn: () =>
|
||||||
fetchJoinLinkPreviews({agent, codes: [code], hasSession}),
|
fetchJoinLinkPreviews({agent, codes: [code], hasSession}),
|
||||||
staleTime: STALE.MINUTES.ONE,
|
staleTime: STALE.SECONDS.FIFTEEN,
|
||||||
})
|
})
|
||||||
return data.joinLinkPreviews[0]
|
return data.joinLinkPreviews[0]
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user