mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 13:17:19 +01:00
Fixed nav menus.
This commit is contained in:
parent
dcc1ae1864
commit
d7fd22645c
9 changed files with 62 additions and 7 deletions
|
|
@ -1,10 +1,11 @@
|
|||
import { useToast } from '@umami/react-zen';
|
||||
import type { ApiError } from '@/lib/types';
|
||||
import { useApi } from '../useApi';
|
||||
import { useModified } from '../useModified';
|
||||
|
||||
export function useUpdateQuery(path: string, params?: Record<string, any>) {
|
||||
const { post, useMutation } = useApi();
|
||||
const query = useMutation({
|
||||
const query = useMutation<any, ApiError, Record<string, any>>({
|
||||
mutationFn: (data: Record<string, any>) => post(path, { ...data, ...params }),
|
||||
});
|
||||
const { touch } = useModified();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue