Converted mutation queries.

This commit is contained in:
Mike Cao 2025-08-24 15:20:19 -07:00
parent 3f167e05ba
commit 0f9669f886
34 changed files with 259 additions and 350 deletions

View file

@ -2,10 +2,10 @@ import { useApi, useModified } from '@/components/hooks';
export function useDeleteQuery(path: string, params?: Record<string, any>) {
const { del, useMutation } = useApi();
const { mutate, isPending, error } = useMutation({
const query = useMutation({
mutationFn: () => del(path, params),
});
const { touch } = useModified();
return { mutate, isPending, error, touch };
return { ...query, touch };
}