chore: add missing file
This commit is contained in:
parent
0d607a8c90
commit
3e314843db
13
web/service/use-base.ts
Normal file
13
web/service/use-base.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {
|
||||||
|
useQueryClient,
|
||||||
|
} from '@tanstack/react-query'
|
||||||
|
|
||||||
|
export const useInvalid = (key: string[]) => {
|
||||||
|
const queryClient = useQueryClient()
|
||||||
|
return () => {
|
||||||
|
queryClient.invalidateQueries(
|
||||||
|
{
|
||||||
|
queryKey: key,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user