set start number 7 for phone mask

This commit is contained in:
smanylov
2025-12-16 21:04:55 +07:00
parent 3b32b38586
commit 6e4dceda0c
+2 -2
View File
@@ -22,8 +22,8 @@ export default function PhoneInput({ phoneState }: PhoneInputProps) {
}
const limitedDigits = digitsOnly.slice(0, 11);
const countryCode = limitedDigits.startsWith('8') ? '8' : '7';
const phoneNumber = limitedDigits.startsWith('8') || limitedDigits.startsWith('7')
const countryCode = 7;
const phoneNumber = limitedDigits.startsWith('7')
? limitedDigits.slice(1)
: limitedDigits;