Skip to content

Commit da0aa15

Browse files
authored
feat: Add name validation for project creation, removed the description validation (#50)
1 parent 834c15a commit da0aa15

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

studio/src/locales/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"callbackForm": "Callback Form",
1515
"resetChat": "Reset/Start Chat",
1616
"homePage.nameAndDescriptionAlert": "Please enter a name and description",
17+
"homePage.nameRequiredAlert": "Please enter a name for the project",
1718
"homePage.deleteProjectError": "Error in deleting project, Please try again later!",
1819
"homePage.dslFileUploadMessage": "If you would like to clone, you can upload an existing program (DSL)",
1920
"editorPage.devModeHeader": "Dev Mode",

studio/src/pages/home-page.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,9 @@ export const HomePage: React.FunctionComponent = () => {
210210
const copyTemplate = (copyTemplateValues: any) => {
211211
try {
212212
if (token) {
213-
if (copyTemplateValues.name.trim() === '' || copyTemplateValues.description.trim() === '') {
214-
alert(t('homePage.nameAndDescriptionAlert'));
213+
if (copyTemplateValues.name.trim() === '') {
214+
alert(t('homePage.nameRequiredAlert'));
215+
return;
215216
}
216217
if (disabled) return
217218
setDisabled(true)

0 commit comments

Comments
 (0)