fix handle length error message (#7802)

This commit is contained in:
Samuel Newman
2025-02-21 08:42:21 -08:00
committed by GitHub
parent b0f7f51b04
commit 798bf47827
2 changed files with 7 additions and 9 deletions
+4 -4
View File
@@ -6,7 +6,7 @@ import {useLingui} from '@lingui/react'
import {logEvent} from '#/lib/statsig/statsig'
import {
createFullHandle,
maxServiceHandleLength,
MAX_SERVICE_HANDLE_LENGTH,
validateServiceHandle,
} from '#/lib/strings/handles'
import {useAgent} from '#/state/session'
@@ -168,11 +168,11 @@ export function StepHandle() {
<IsValidIcon
valid={validCheck.frontLength && validCheck.totalLength}
/>
{!validCheck.totalLength ? (
{!validCheck.totalLength ||
draftValue.length > MAX_SERVICE_HANDLE_LENGTH ? (
<Text style={[a.text_md, a.flex_1]}>
<Trans>
No longer than {maxServiceHandleLength(state.userDomain)}{' '}
characters
No longer than {MAX_SERVICE_HANDLE_LENGTH} characters
</Trans>
</Text>
) : (