From 1015a600419f005527d4407b1f7e071bde7d90b7 Mon Sep 17 00:00:00 2001 From: Zerebos Date: Wed, 21 Feb 2024 23:10:48 -0500 Subject: [PATCH] Add onClose to confirmation modal Fixes #1646 --- renderer/src/ui/modals.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderer/src/ui/modals.js b/renderer/src/ui/modals.js index d5e5a09f..5f4aaeb1 100644 --- a/renderer/src/ui/modals.js +++ b/renderer/src/ui/modals.js @@ -182,7 +182,6 @@ export default class Modals { content = content.map(c => typeof(c) === "string" ? React.createElement(Markdown, null, c) : c); const modalKey = ModalActions.openModal(props => { - console.log(props); return React.createElement(ErrorBoundary, { onError: () => { setTimeout(() => { @@ -200,7 +199,9 @@ export default class Modals { cancelText: cancelText, onConfirm: onConfirm, onCancel: onCancel, - onCloseCallback: () => {if (props?.transitionState === 1) onClose?.()} + onCloseCallback: () => { + if (props?.transitionState === 1) onClose?.(); + } }, props), React.createElement(ErrorBoundary, {}, content))); }, {modalKey: key}); return modalKey;