From 84f8f3c5bc35b190e107caea1677ee4b991613a4 Mon Sep 17 00:00:00 2001 From: Trevor Bayless Date: Thu, 28 Oct 2021 20:48:33 -0500 Subject: [PATCH] Adjust confirmation dialog logic so closed dialogs can reopen (#1259) --- frontend/src/Editor/Viewer/Confirm.jsx | 8 ++---- frontend/src/HomePage/HomePage.jsx | 32 +++++++++++----------- frontend/src/_components/ConfirmDialog.jsx | 8 ++---- 3 files changed, 20 insertions(+), 28 deletions(-) diff --git a/frontend/src/Editor/Viewer/Confirm.jsx b/frontend/src/Editor/Viewer/Confirm.jsx index b22aba26f5..0b825897c4 100644 --- a/frontend/src/Editor/Viewer/Confirm.jsx +++ b/frontend/src/Editor/Viewer/Confirm.jsx @@ -10,6 +10,7 @@ export function Confirm({ show, message, onConfirm, onCancel, queryConfirmationD }, [show]); const handleClose = () => { + onCancel(); setShow(false); }; @@ -18,18 +19,13 @@ export function Confirm({ show, message, onConfirm, onCancel, queryConfirmationD handleClose(); }; - const handleCancel = () => { - onCancel(); - handleClose(); - }; - return ( <>
{message} -