From b90ad0a24686b68fee79d2bae534d744a728babe Mon Sep 17 00:00:00 2001 From: Michal Bartosik Date: Tue, 28 Sep 2021 20:55:21 +0200 Subject: [PATCH] More changes in API --- src/pages/CountryDetails/CountryDetails.tsx | 8 ++++---- src/store/index.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/CountryDetails/CountryDetails.tsx b/src/pages/CountryDetails/CountryDetails.tsx index d5c31ea..b28ea66 100644 --- a/src/pages/CountryDetails/CountryDetails.tsx +++ b/src/pages/CountryDetails/CountryDetails.tsx @@ -46,14 +46,14 @@ const CountryDetails: React.FC = () => { ? country?.population.toLocaleString() : 'n/a'} -
  • - Continent: - {country?.continent || 'n/a'} -
  • Region: {country?.region || 'n/a'}
  • +
  • + Subregion: + {country?.subregion || 'n/a'} +
  • Capital: {country?.capital || 'n/a'} diff --git a/src/store/index.ts b/src/store/index.ts index 0cf9de9..351b726 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -37,7 +37,7 @@ export const filteredByRegionCountriesState = selector({ if (filter === Regions.All) { return countries; } - return countries.filter(country => country.continent === filter); + return countries.filter(country => country.region === filter); }, });