This commit is contained in:
Anantshree Chandola 2023-10-17 15:36:24 +05:30
parent d4b436dd31
commit 82a8b096fa
2 changed files with 8 additions and 4 deletions

View file

@ -120,8 +120,12 @@ function EditAppName({ appId, appName = '', onNameChanged }) {
</ToolTip>
<InfoOrErrorBox
active={isError || isEditing}
message={errorMessage || warningText || 'App name should be unique and max 50 characters'}
isWarning={warningText}
message={
errorMessage || warningText || name.length >= 50
? 'Maximum length has been reached'
: 'App name should be unique and max 50 characters'
}
isWarning={warningText || name.length >= 50}
isError={isError}
darkMode={darkMode}
additionalClassName={isError ? 'error' : ''}

View file

@ -159,7 +159,7 @@ export function AppModal({
>
{errorText}
</small>
) : infoText ? (
) : infoText || newAppName.length >= 50 ? (
<small
className="tj-input-error"
style={{
@ -167,7 +167,7 @@ export function AppModal({
color: '#ED5F00',
}}
>
{infoText}
{infoText || 'Maximum length has been reached'}
</small>
) : (
<small