mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
11 lines
364 B
TypeScript
11 lines
364 B
TypeScript
import { useApi, useModified } from '@/components/hooks';
|
|
|
|
export function useDeleteQuery(path: string, params?: { [key: string]: any }) {
|
|
const { del, useMutation } = useApi();
|
|
const { mutate, isPending, error } = useMutation({
|
|
mutationFn: () => del(path, params),
|
|
});
|
|
const { touch } = useModified();
|
|
|
|
return { mutate, isPending, error, touch };
|
|
}
|