mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Converted mutation queries.
This commit is contained in:
parent
3f167e05ba
commit
0f9669f886
34 changed files with 259 additions and 350 deletions
|
|
@ -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 };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue