Fixed mutate.

This commit is contained in:
Mike Cao 2023-12-03 22:20:36 -08:00
parent a4f8ab6ad9
commit 905b480c13

View File

@ -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, {