From 8eca1a34e3f43a88a2c19f96d02cd31d4913fe7a Mon Sep 17 00:00:00 2001 From: Christopher Solanilla Date: Thu, 5 Sep 2024 14:10:11 -0400 Subject: [PATCH] Updates save draft button on cancel without whitespace monster --- src/components/widget-creator.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/widget-creator.jsx b/src/components/widget-creator.jsx index 79194916d..705bd30a1 100644 --- a/src/components/widget-creator.jsx +++ b/src/components/widget-creator.jsx @@ -449,6 +449,8 @@ const WidgetCreator = ({instId, widgetId, minHeight='', minWidth=''}) => { }) setCreatorState({...creatorState, heartbeatEnabled: false}) + //also update the text on the Save Draft Button + setCreatorState({ ...creatorState, saveText: 'Failed to save' }) } else { setAlertDialog({ enabled: true, @@ -457,6 +459,9 @@ const WidgetCreator = ({instId, widgetId, minHeight='', minWidth=''}) => { fatal: false, enableLoginButton: false }) + //also update the text on the Save Draft Button + setCreatorState({ ...creatorState, saveText: 'Failed to save' }) + } } else { setAlertDialog({ @@ -466,6 +471,9 @@ const WidgetCreator = ({instId, widgetId, minHeight='', minWidth=''}) => { fatal: false, enableLoginButton: false }) + //also update the text on the Save Draft Button + setCreatorState({ ...creatorState, saveText: 'Failed to save' }) + } } @@ -824,4 +832,4 @@ const WidgetCreator = ({instId, widgetId, minHeight='', minWidth=''}) => { } -export default WidgetCreator \ No newline at end of file +export default WidgetCreator