Merge pull request 'bug-fix: added country wise phone number length restrictions' (#73) from phone-code into main

Reviewed-on: https://git.zedobject.local/AcuPedia/acupedia-store-ui/pulls/73
Reviewed-by: Amit Salunke <amit@noreply.localhost>
This commit is contained in:
Amit Salunke 2026-10-30 05:36:12 +00:00
commit c07bb6b52f
2 changed files with 4 additions and 2 deletions

View File

@ -1,2 +1,2 @@
Branch: main Branch: phone-code
Commit: 75acd1de923fe310458333b66b71450f444eee2b Commit: 57cf92f4a68510b598927e96163f4cce5d75c309

View File

@ -298,6 +298,7 @@ export const AuthModal: React.FC<AuthModalProps> = ({
const rule = getCountryRuleByDialCode(newCode); const rule = getCountryRuleByDialCode(newCode);
if (rule && rule.country !== 'Other') { if (rule && rule.country !== 'Other') {
setAuthCountry(rule.country); 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" 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); const rule = getCountryRuleByName(newCountry);
if (rule) { if (rule) {
setAuthDialCode(rule.code); 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" 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"