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

This commit is contained in:
Urvish Prajapati 2026-11-05 15:33:14 +05:30
parent bf167e3f0a
commit 2e964173b4
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("");
};