Skip to content

Commit

Permalink
Updates save draft button on cancel without whitespace monster
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissolanilla committed Sep 5, 2024
1 parent 85dd532 commit 8eca1a3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/widget-creator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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({
Expand All @@ -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' })

}
}

Expand Down Expand Up @@ -824,4 +832,4 @@ const WidgetCreator = ({instId, widgetId, minHeight='', minWidth=''}) => {

}

export default WidgetCreator
export default WidgetCreator

0 comments on commit 8eca1a3

Please sign in to comment.