We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b569c1 commit ef4c2daCopy full SHA for ef4c2da
src/pages/NewStory.js
@@ -119,11 +119,13 @@ const NewStory = () => {
119
setCurrentProductSelected(selectedProduct?.id ?? 'None')
120
}
121
122
- const onSubmit = async (data) => {
+ const descError = () => {
123
if (!description?.length) {
124
setDescriptionError(true)
125
- return
126
+ }
127
+
128
+ const onSubmit = async (data) => {
129
data.Description = filterDescriptionText(description)
130
const formData = new FormData()
131
formData.append('data', JSON.stringify(data))
@@ -270,6 +272,7 @@ const NewStory = () => {
270
272
type='submit'
271
273
data-cy='btn-submit'
274
className='btn btn-default'
275
+ onClick={descError}
276
>
277
Submit
278
</Button>
0 commit comments