mirror of https://github.com/harness/drone.git
fix: [code-1663]: add error message on submit btn (#1136)
parent
ac7ac5e881
commit
00f58fd08e
|
@ -478,8 +478,12 @@ export function MarkdownEditorWithPreview({
|
|||
variation={ButtonVariation.PRIMARY}
|
||||
disabled={false}
|
||||
onClick={() => {
|
||||
handleUpload(file as File, setMarkdownContent, repoMetadata, showError, standalone, routingId)
|
||||
setOpen(false)
|
||||
if (file !== undefined) {
|
||||
handleUpload(file as File, setMarkdownContent, repoMetadata, showError, standalone, routingId)
|
||||
setOpen(false)
|
||||
} else {
|
||||
showError(getString('uploadAFileError'))
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
|
|
|
@ -852,6 +852,7 @@ export interface StringsMap {
|
|||
updateUser: string
|
||||
updateWebhook: string
|
||||
updated: string
|
||||
uploadAFileError: string
|
||||
user: string
|
||||
userCreated: string
|
||||
userId: string
|
||||
|
|
|
@ -1002,3 +1002,4 @@ summary: Summary
|
|||
prGenSummary: Have Harness AIDA summarize the code changes in this pull request
|
||||
aidaGenSummary: '[AIDA is generating a summary...]'
|
||||
importFailed: Import Failed
|
||||
uploadAFileError: There is no image or video uploaded. Please upload an image or video.
|
||||
|
|
Loading…
Reference in New Issue