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.
2 parents 3676b93 + ef4c2da commit 86578d9Copy full SHA for 86578d9
src/pages/NewStory.js
@@ -105,11 +105,13 @@ const NewStory = () => {
105
setCurrentProductSelected(selectedProduct?.id ?? 'None')
106
}
107
108
- const onSubmit = async (data) => {
+ const descError = () => {
109
if (!description?.length) {
110
setDescriptionError(true)
111
- return
112
+ }
113
+
114
+ const onSubmit = async (data) => {
115
data.Description = filterDescriptionText(description)
116
const formData = new FormData()
117
formData.append('data', JSON.stringify(data))
@@ -249,6 +251,7 @@ const NewStory = () => {
249
251
type='submit'
250
252
data-cy='btn-submit'
253
className='btn btn-default'
254
+ onClick={descError}
255
>
256
Submit
257
</Button>
0 commit comments