mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
New schema for pixels and links.
This commit is contained in:
parent
c60e8b3d23
commit
88639dfe83
67 changed files with 993 additions and 208 deletions
11
src/components/hooks/queries/useUpdateQuery.ts
Normal file
11
src/components/hooks/queries/useUpdateQuery.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { useApi, useModified } from '@/components/hooks';
|
||||
|
||||
export function useUpdateQuery(path: string, params?: Record<string, any>) {
|
||||
const { post, useMutation } = useApi();
|
||||
const { mutate, isPending, error } = useMutation({
|
||||
mutationFn: (data: Record<string, any>) => post(path, { ...data, ...params }),
|
||||
});
|
||||
const { touch } = useModified();
|
||||
|
||||
return { mutate, isPending, error, touch };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue