import { useState } from "react";
import CountryData from "./CountryData";
const Countries = ({ showedCountries }) => {
const [country, setCountry] = useState("");
if (showedCountries.length === 1) {
return ;
} else if (showedCountries.length <= 10) {
return (
{showedCountries.map((country) => (
{country.name.common}{" "}
))}
{country &&
}
);
} else if (showedCountries.length > 10) {
return Too many matches, specify another filter
;
}
};
export default Countries;