Merge pull request 'fix(auth): clear phone number field when country changes during sign up' (#113) from fix/clear-phone-on-country-change into main
Reviewed-on: https://git.zedobject.local/AcuPedia/acupedia-mobile-ui/pulls/113 Reviewed-by: Amit Salunke <amit@noreply.localhost>
This commit is contained in:
commit
a15813b8fd
|
|
@ -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("");
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue