From 8be889734ce2528016131dbbe1a2364a89b3fa71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 7 Apr 2022 21:23:00 +0200 Subject: [PATCH] well, fix confirmation modal after fixing a typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/actions/compose.js | 5 ++++- app/soapbox/features/ui/components/confirmation_modal.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/soapbox/actions/compose.js b/app/soapbox/actions/compose.js index 9f1555ae9..becb39b81 100644 --- a/app/soapbox/actions/compose.js +++ b/app/soapbox/actions/compose.js @@ -236,7 +236,10 @@ export function submitCompose(routerHistory, force = false) { if (!force && needsDescriptions(state)) { dispatch(openModal('MISSING_DESCRIPTION', { - onContinue: () => dispatch(submitCompose(routerHistory, true)), + onContinue: () => { + dispatch(closeModal('MISSING_DESCRIPTION')); + dispatch(submitCompose(routerHistory, true)); + }, })); return; } diff --git a/app/soapbox/features/ui/components/confirmation_modal.js b/app/soapbox/features/ui/components/confirmation_modal.js index 3f16287ad..ab740a940 100644 --- a/app/soapbox/features/ui/components/confirmation_modal.js +++ b/app/soapbox/features/ui/components/confirmation_modal.js @@ -61,7 +61,7 @@ class ConfirmationModal extends React.PureComponent { cancelText={} cancelAction={this.handleCancel} secondaryText={secondary} - secondaryAction={this.handleSecondary} + secondaryAction={this.props.onSecondary && this.handleSecondary} >

{message}