mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
New goals page. Upgraded prisma.
This commit is contained in:
parent
99330a1a4d
commit
49bcbfd7f9
65 changed files with 769 additions and 1195 deletions
11
src/components/hooks/queries/useDeleteQuery.ts
Normal file
11
src/components/hooks/queries/useDeleteQuery.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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 };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue