fix(auth): clear phone number field when country changes during sign up #113

Merged
amit merged 1 commits from fix/clear-phone-on-country-change into main 2026-11-06 04:58:10 +00:00
1 changed files with 3 additions and 3 deletions

View File

@ -70,12 +70,12 @@ export default function SignUpForm() {
};
const handleCountrySelect = (c: CountryCode) => {
if (c.country !== selectedCountry.country) {
setPhone("");
}
setSelectedCountry(c);
setShowCountryModal(false);
setCountrySearch("");
if (phone.length > c.maxLength) {
setPhone(phone.slice(0, c.maxLength));
}
if (phoneError) setPhoneError("");
};