From 5453c1ad38ee97caab58a36db5ff4c77d736ef98 Mon Sep 17 00:00:00 2001 From: Sampo Tawast Date: Wed, 20 Sep 2023 08:52:03 +0300 Subject: [PATCH] fix: batch animation bug which also broke error toast --- .../batchProcessing/BatchActionsInspectionForm.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/benefit/handler/src/components/batchProcessing/BatchActionsInspectionForm.tsx b/frontend/benefit/handler/src/components/batchProcessing/BatchActionsInspectionForm.tsx index cc4573e24c..08da311ffe 100644 --- a/frontend/benefit/handler/src/components/batchProcessing/BatchActionsInspectionForm.tsx +++ b/frontend/benefit/handler/src/components/batchProcessing/BatchActionsInspectionForm.tsx @@ -51,7 +51,7 @@ BatchProps) => { setBatchCloseAnimation ); - const { mutate: changeBatchStatus } = useBatchStatus(); + const { mutate: changeBatchStatus } = useBatchStatus(setBatchCloseAnimation); const [isModalBatchToDraft, setModalBatchToDraft] = React.useState(false); const [isModalBatchToCompletion, setModalBatchToCompletion] = React.useState(false); @@ -76,7 +76,10 @@ BatchProps) => { }; const handleBatchStatusChange = (): void => { - changeBatchStatus({ id, status: BATCH_STATUSES.DRAFT }); + changeBatchStatus({ + id, + status: BATCH_STATUSES.DRAFT, + }); setModalBatchToDraft(false); };