Skip to content

Commit

Permalink
fix: batch animation bug which also broke error toast (#2283)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast committed Sep 20, 2023
1 parent 592c533 commit 0f248c2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -76,7 +76,10 @@ BatchProps) => {
};

const handleBatchStatusChange = (): void => {
changeBatchStatus({ id, status: BATCH_STATUSES.DRAFT });
changeBatchStatus({
id,
status: BATCH_STATUSES.DRAFT,
});
setModalBatchToDraft(false);
};

Expand Down

0 comments on commit 0f248c2

Please sign in to comment.