Skip to content

Commit

Permalink
Fix missing flag issue in "Phone Number" section
Browse files Browse the repository at this point in the history
I have fixed the missing flag issue by updating the base path for the
flag source and I tested the same thing after updaing, and I made a
video for the same and we can check here → https://app.screencast.com/a6nxZYx8p8qbe
  • Loading branch information
Rajat Jindal committed Oct 11, 2024
1 parent e2e5d3f commit 636a4a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/i18nify-playground/src/constants/geo/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export const ALLOWED_COUNTRIES = ['IN', 'MY', 'FR', 'DE', 'US'];

export const FLAG_4X3_BASE_PATH =
'https://unpkg.com/@razorpay/i18nify-js/lib/assets/flags';
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ import {
localPhoneNumbersByDialCodeMap,
} from './data/phoneNumber';

import {
FLAG_4X3_BASE_PATH
} from '../../constants/geo';

const PhoneNumberForm = ({
inpValue,
onInpChange,
Expand Down Expand Up @@ -88,7 +92,7 @@ const PhoneNumberForm = ({
marginRight: 8,
}}
loading="lazy"
src={`/assets/flags/${dialCodeCountryCodeMap[
src={`${FLAG_4X3_BASE_PATH}/${dialCodeCountryCodeMap[
code
][0].toLocaleLowerCase()}.svg`}
/>
Expand Down

0 comments on commit 636a4a7

Please sign in to comment.