Follow up to #39458 - Hardcoded maxLength of 30 for display name after recent change to 40. (#39499)

This commit is contained in:
Shlee 2026-06-20 02:41:54 +09:30 committed by Claire
parent 5a3f942a5d
commit eb2d1c0f2a

View File

@ -72,6 +72,11 @@ export const Profile: React.FC<{
const intl = useIntl();
const history = useHistory();
const maxDisplayNameLength = useAppSelector(
(state) =>
state.server.server.item?.configuration.accounts.max_display_name_length,
);
const handleDisplayNameChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
setDisplayName(e.target.value);
@ -218,7 +223,7 @@ export const Profile: React.FC<{
<div className='fields-group'>
<TextInputField
maxLength={30}
maxLength={maxDisplayNameLength ?? 40}
label={
<FormattedMessage
id='onboarding.profile.display_name'