Closed MorganeAlinai closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is how I do it
useEffect(() => {
const getCorrectCountry = async () => {
const allCountries = await getAllCountries(FlagType.FLAT); // import getAllCountries from this library
const country = allCountries.find((item) => item.cca2 === twoLettersCode);
if (country?.name) {
setCountryName(country.name.toString());
}
};
getCorrectCountry();
}, []);
Hi,
I use your plugin to select the country for our users.
I store two letter codes like "FR".
At some point in the UI, I need to transform that "FR" into "France".
I've seen in the code that you have the method for that, but it don't seem to be exported, unless I miss something.
It's my first app so I may be asking a stupid question but, is there a way to get this method in my code ?
Thanks