Skip to content

Commit 3924ef8

Browse files
authored
Fix mismatched dialog text for task approval/failure (#55)
1 parent 77c59b1 commit 3924ef8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/TaskApprovementPanel.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ function TaskApprovementPanel({
8787
return () => confirmed && clearConfirm(false);
8888
}, [confirmed]);
8989

90-
const openResolveTaskConfirmDialog = () => coreConfirm(
90+
const openResolveTaskConfirmDialog = (choiceString) => coreConfirm(
9191
formatMessage('task.resolve.confirm.title'),
92-
approveOrFail === APPROVED ? formatMessage('task.resolve.confirm.fail.message')
93-
: formatMessage('task.resolve.confirm.approve.message'),
92+
choiceString === APPROVED ? formatMessage('task.resolve.confirm.approve.message')
93+
: formatMessage('task.resolve.confirm.fail.message'),
9494
);
9595

9696
const handleButtonClick = (choiceString) => {
9797
if (task?.id && user?.id) {
98-
openResolveTaskConfirmDialog(approveOrFail);
98+
openResolveTaskConfirmDialog(choiceString);
9999
setApproveOrFail(choiceString);
100100
}
101101
};

0 commit comments

Comments
 (0)