diff --git a/part2/countries/src/App.js b/part2/countries/src/App.js
index 42d9cbe..3c7b100 100644
--- a/part2/countries/src/App.js
+++ b/part2/countries/src/App.js
@@ -9,7 +9,7 @@ const App = () => {
const CountryData = ({ country }) => {
return (
-
{country.name.common}
+
{country.name.official}
Capital: {country.capital}
Area: {country.area} km²
Languages:
@@ -24,14 +24,19 @@ const App = () => {
};
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.name.common}{" "}
+
+
))}
+ {country &&
}
);
} else if (showedCountries.length > 10) {