Skip to content

Commit

Permalink
Added cases to handle 001 and ac country code
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthak-kumar-shailendra committed Dec 17, 2024
1 parent bf51faf commit e347a9c
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
localPhoneNumbersByDialCodeMap,
} from './data/phoneNumber';

import { FLAG_4X3_BASE_PATH } from 'src/constants/phoneNumber';
import { FLAG_CDN_BASE_PATH } from 'src/constants/phoneNumber';

const PhoneNumberForm = ({
inpValue,
Expand Down Expand Up @@ -90,9 +90,11 @@ const PhoneNumberForm = ({
marginRight: 8,
}}
loading="lazy"
src={`${FLAG_4X3_BASE_PATH}/${dialCodeCountryCodeMap[
code
][0].toLocaleLowerCase()}.svg`}
src={`${FLAG_CDN_BASE_PATH}/${
dialCodeCountryCodeMap[code][0].toLocaleLowerCase() === '001'? 'us' :
dialCodeCountryCodeMap[code][0].toLocaleLowerCase() === 'ac' ? 'sh' :
dialCodeCountryCodeMap[code][0].toLocaleLowerCase()
}.svg`}
/>
</Box>
</MenuItem>
Expand Down

0 comments on commit e347a9c

Please sign in to comment.