mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Converted mutation queries.
This commit is contained in:
parent
3f167e05ba
commit
0f9669f886
34 changed files with 259 additions and 350 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { AlertDialog, Row } from '@umami/react-zen';
|
||||
import { useApi, useMessages, useModified } from '@/components/hooks';
|
||||
import { useDeleteQuery, useMessages, useModified } from '@/components/hooks';
|
||||
|
||||
export function UserDeleteForm({
|
||||
userId,
|
||||
|
|
@ -13,8 +13,7 @@ export function UserDeleteForm({
|
|||
onClose?: () => void;
|
||||
}) {
|
||||
const { messages, labels, formatMessage } = useMessages();
|
||||
const { del, useMutation } = useApi();
|
||||
const { mutate } = useMutation({ mutationFn: () => del(`/users/${userId}`) });
|
||||
const { mutate } = useDeleteQuery(`/users/${userId}`);
|
||||
const { touch } = useModified();
|
||||
|
||||
const handleConfirm = async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue