mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
Converted mutation queries.
This commit is contained in:
parent
3f167e05ba
commit
0f9669f886
34 changed files with 259 additions and 350 deletions
|
|
@ -3,8 +3,7 @@ import { ActionButton } from '@/components/input/ActionButton';
|
|||
import { Trash } from '@/components/icons';
|
||||
import { ConfirmationForm } from '@/components/common/ConfirmationForm';
|
||||
import { messages } from '@/components/messages';
|
||||
import { useApi, useMessages, useModified } from '@/components/hooks';
|
||||
|
||||
import { useDeleteQuery, useMessages, useModified } from '@/components/hooks';
|
||||
export function PixelDeleteButton({
|
||||
pixelId,
|
||||
name,
|
||||
|
|
@ -15,10 +14,7 @@ export function PixelDeleteButton({
|
|||
onSave?: () => void;
|
||||
}) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { del, useMutation } = useApi();
|
||||
const { mutate, isPending, error } = useMutation({
|
||||
mutationFn: () => del(`/pixels/${pixelId}`),
|
||||
});
|
||||
const { mutate, isPending, error } = useDeleteQuery(`/pixels/${pixelId}`);
|
||||
const { touch } = useModified();
|
||||
|
||||
const handleConfirm = (close: () => void) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue