From 905b480c131a1e570317571d331a74b8b031bc7b Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sun, 3 Dec 2023 22:20:36 -0800 Subject: [PATCH] Fixed mutate. --- src/app/(main)/reports/ReportDeleteButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(main)/reports/ReportDeleteButton.tsx b/src/app/(main)/reports/ReportDeleteButton.tsx index d3f1bb4f..32ec819e 100644 --- a/src/app/(main)/reports/ReportDeleteButton.tsx +++ b/src/app/(main)/reports/ReportDeleteButton.tsx @@ -14,7 +14,7 @@ export function ReportDeleteButton({ }) { const { formatMessage, labels } = useMessages(); const { del, useMutation } = useApi(); - const { mutate } = useMutation(reportId => del(`/reports/${reportId}`)); + const { mutate } = useMutation({ mutationFn: reportId => del(`/reports/${reportId}`) }); const handleConfirm = (close: () => void) => { mutate(reportId as any, {