Pixel editing.

This commit is contained in:
Mike Cao 2025-08-15 13:04:13 -07:00
parent eabdd18604
commit d130242a0a
23 changed files with 72 additions and 49 deletions

View file

@ -7,19 +7,17 @@ import { useApi, useMessages, useModified } from '@/components/hooks';
export function PixelDeleteButton({
pixelId,
websiteId,
name,
onSave,
}: {
pixelId: string;
websiteId: string;
name: string;
onSave?: () => void;
}) {
const { formatMessage, labels } = useMessages();
const { del, useMutation } = useApi();
const { mutate, isPending, error } = useMutation({
mutationFn: () => del(`/websites/${websiteId}/pixels/${pixelId}`),
mutationFn: () => del(`/pixels/${pixelId}`),
});
const { touch } = useModified();