Reduce web requests (#2420)

* Stop auto-refetching app passwords and invites on an interval

* Don't poll for posts or notifs if the app/tab isnt focused
This commit is contained in:
Paul Frazee 2024-01-04 17:36:27 -08:00 committed by GitHub
parent 8a4a8af61c
commit db62f27241
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View file

@ -16,7 +16,6 @@ export type InviteCodesQueryResponse = Exclude<
export function useInviteCodesQuery() {
return useQuery({
staleTime: STALE.MINUTES.FIVE,
refetchInterval: STALE.MINUTES.FIVE,
queryKey: ['inviteCodes'],
queryFn: async () => {
const res = await getAgent()