Fix role selection defaults and phone input typing

This commit is contained in:
Esdras Renan 2025-10-18 19:28:37 -03:00
parent a69d37a672
commit 2400f34c80
2 changed files with 9 additions and 9 deletions

View file

@ -104,13 +104,13 @@ const SPECIAL_FORMATS: Record<string, { maxDigits: number; formatLocal: (digits:
CA: { maxDigits: 10, formatLocal: formatUsPhone },
}
const COUNTRY_OPTIONS: CountryOption[] = COUNTRY_DIAL_CODES.map((entry: CountryDialCode) => {
const special = SPECIAL_FORMATS[entry.code]
const COUNTRY_OPTIONS: CountryOption[] = COUNTRY_DIAL_CODES.map(({ code, name, dialCode }: CountryDialCode) => {
const special = SPECIAL_FORMATS[code]
return {
code: entry.code,
label: regionDisplayNames?.of(entry.code) ?? entry.name ?? entry.code,
dialCode: entry.dialCode,
flag: flagEmojiFor(entry.code),
code,
label: regionDisplayNames?.of(code) ?? name ?? code,
dialCode,
flag: flagEmojiFor(code),
maxDigits: special?.maxDigits ?? 15,
formatLocal: special?.formatLocal ?? formatGenericPhone,
}