bug-fix: added country wise phone number length restrictions #73
|
|
@ -1,2 +1,2 @@
|
|||
Branch: main
|
||||
Commit: 75acd1de923fe310458333b66b71450f444eee2b
|
||||
Branch: phone-code
|
||||
Commit: 57cf92f4a68510b598927e96163f4cce5d75c309
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ export const AuthModal: React.FC<AuthModalProps> = ({
|
|||
const rule = getCountryRuleByDialCode(newCode);
|
||||
if (rule && rule.country !== 'Other') {
|
||||
setAuthCountry(rule.country);
|
||||
setAuthPhone(cleanPhoneInput(authPhone, rule.maxLength, false));
|
||||
}
|
||||
}}
|
||||
className="w-[90px] bg-slate-950 border border-slate-800 rounded-xl px-3 py-2.5 text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 appearance-none"
|
||||
|
|
@ -341,6 +342,7 @@ export const AuthModal: React.FC<AuthModalProps> = ({
|
|||
const rule = getCountryRuleByName(newCountry);
|
||||
if (rule) {
|
||||
setAuthDialCode(rule.code);
|
||||
setAuthPhone(cleanPhoneInput(authPhone, rule.maxLength, false));
|
||||
}
|
||||
}}
|
||||
className="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 appearance-none"
|
||||
|
|
|
|||
Loading…
Reference in New Issue