chore: add missing file

This commit is contained in:
Joel 2024-11-13 16:22:28 +08:00
parent 0d607a8c90
commit 3e314843db

13
web/service/use-base.ts Normal file
View File

@ -0,0 +1,13 @@
import {
useQueryClient,
} from '@tanstack/react-query'
export const useInvalid = (key: string[]) => {
const queryClient = useQueryClient()
return () => {
queryClient.invalidateQueries(
{
queryKey: key,
})
}
}