diff --git a/studio/src/locales/en.json b/studio/src/locales/en.json index a997928..9199e2b 100644 --- a/studio/src/locales/en.json +++ b/studio/src/locales/en.json @@ -14,6 +14,7 @@ "callbackForm": "Callback Form", "resetChat": "Reset/Start Chat", "homePage.nameAndDescriptionAlert": "Please enter a name and description", + "homePage.nameRequiredAlert": "Please enter a name for the project", "homePage.deleteProjectError": "Error in deleting project, Please try again later!", "homePage.dslFileUploadMessage": "If you would like to clone, you can upload an existing program (DSL)", "editorPage.devModeHeader": "Dev Mode", diff --git a/studio/src/pages/home-page.tsx b/studio/src/pages/home-page.tsx index 6d1f8d2..1b52cf3 100644 --- a/studio/src/pages/home-page.tsx +++ b/studio/src/pages/home-page.tsx @@ -210,8 +210,9 @@ export const HomePage: React.FunctionComponent = () => { const copyTemplate = (copyTemplateValues: any) => { try { if (token) { - if (copyTemplateValues.name.trim() === '' || copyTemplateValues.description.trim() === '') { - alert(t('homePage.nameAndDescriptionAlert')); + if (copyTemplateValues.name.trim() === '') { + alert(t('homePage.nameRequiredAlert')); + return; } if (disabled) return setDisabled(true)