[Glitch] Follow up to #39458 - Hardcoded maxLength of 30 for display name after recent change to 40.

Port 310e82109b8c7d143f0f77f116ae035590a64ca1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Shlee 2026-06-20 02:41:54 +09:30 committed by Claire
parent 7c21f06bd7
commit 62b479a852

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'