mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
12 lines
346 B
TypeScript
12 lines
346 B
TypeScript
import { useApi } from '../useApi';
|
|
import { useModified } from '../useModified';
|
|
|
|
export function useDeleteQuery(path: string, params?: Record<string, any>) {
|
|
const { del, useMutation } = useApi();
|
|
const query = useMutation({
|
|
mutationFn: () => del(path, params),
|
|
});
|
|
const { touch } = useModified();
|
|
|
|
return { ...query, touch };
|
|
}
|