Add a country-code dropdown to Telegram phone entry
The single free-text phone field made the required "+" country prefix easy to miss or mistype. Split into a country select (built from libphonenumber-js's own ISO list + the browser's Intl.DisplayNames for names - no hand-maintained country/dial-code table) defaulting to a guess from navigator.language, plus a national-number field; the two compose into the same E.164 string requestTelegramCode already expected, so nothing downstream changed. Co-Authored-By:Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
Showing
| ... | @@ -19,6 +19,7 @@ | ... | @@ -19,6 +19,7 @@ |
| "class-variance-authority": "^0.7.1", | "class-variance-authority": "^0.7.1", | ||
| "cn": "^0.4.0", | "cn": "^0.4.0", | ||
| "leaflet": "^1.9.4", | "leaflet": "^1.9.4", | ||
| "libphonenumber-js": "^1.13.15", | |||
| "lottie-react": "^3.1.2", | "lottie-react": "^3.1.2", | ||
| "lucide-react": "^1.31.0", | "lucide-react": "^1.31.0", | ||
| "react": "^19.2.8", | "react": "^19.2.8", | ||
| ... | ... |
src/lib/countries.ts
0 → 100644
Please
register
or
sign in
to comment