Skip to content

Commit

Permalink
fix: updating own device info should invalidate reads related to proj…
Browse files Browse the repository at this point in the history
…ect members (#30)
  • Loading branch information
achou11 authored Jan 13, 2025
1 parent 92f5be0 commit 6958d57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/react-query/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
type QueryClient,
} from '@tanstack/react-query'

import { getProjectsQueryKey } from './projects.js'
import {
baseMutationOptions,
baseQueryOptions,
Expand Down Expand Up @@ -68,6 +69,9 @@ export function setOwnDeviceInfoMutationOptions({
queryClient.invalidateQueries({
queryKey: getDeviceInfoQueryKey(),
})
queryClient.invalidateQueries({
queryKey: getProjectsQueryKey(),
})
},
} satisfies MutationOptions<
void,
Expand Down

0 comments on commit 6958d57

Please sign in to comment.