Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fromAlpha2Code: code => {
return {
name: countries.getName(code, 'en'),
emoji: flag(code),
};
},
};
.map(countryCode => {
const countryHasContent = countriesWithContent.includes(
countryCode
);
const countryFlag = flag(countryCode);
const countryName = countries[countryCode];
if (!countryHasContent) {
return (
<div>
{countryFlag} {countryName}
<div>
<small>
We don't have any content for {countryName}, yet.
Why not{' '}
</small></div></div>
{({ country, setCountry, clearCountry }) => (
<div>
<div>
<h1>Select Your Country</h1>
<input placeholder="Filter Countries" type="text"> setSearchTerm(e.target.value.toLowerCase())}
/>
</div>
<div>
{country.name !== null ? (
<div>
<small>Currently selected</small>
<div>
{flag(country.code)} {country.name}
</div>
<a href="#"> {
e.preventDefault();
clearCountry();
navigate('/');
}}
>
Remove
</a>
</div>
) : null}
{Object.keys(countries)
.filter(countryCode =>
countries[countryCode].toLowerCase().includes(searchTerm)</div></div>