first relase

This commit is contained in:
Lê đ tú 2025-10-17 11:11:14 +07:00
parent d3a42ba6e9
commit c6afce22ed
288 changed files with 55505 additions and 192 deletions

26
service/use-base.ts Normal file
View file

@ -0,0 +1,26 @@
import {
type QueryKey,
useQueryClient,
} from '@tanstack/react-query'
export const useInvalid = (key: QueryKey) => {
const queryClient = useQueryClient()
return () => {
queryClient.invalidateQueries(
{
queryKey: key,
},
)
}
}
export const useReset = (key: QueryKey) => {
const queryClient = useQueryClient()
return () => {
queryClient.resetQueries(
{
queryKey: key,
},
)
}
}