From 55a42cde4bdc0311a17adde4265d987220485c07 Mon Sep 17 00:00:00 2001 From: mialy Date: Wed, 24 Jan 2024 18:10:35 +0100 Subject: [PATCH] fix(country page): filter --- client/src/pages/country/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/country/index.js b/client/src/pages/country/index.js index 21c7942..d94ea12 100644 --- a/client/src/pages/country/index.js +++ b/client/src/pages/country/index.js @@ -37,7 +37,7 @@ export default function Fiche({ exportState }) { const { data, isLoading, error, isUnknownCountry } = useFetchData(isoCode); let actorName = ''; - const dataPays = data['curiexplore-pays']?.find((country) => country.fields.iso3 === isoCode).fields; + const dataPays = data['curiexplore-pays']?.filter((country) => country.fields.curiexplore === 'TRUE').find((country) => country.fields.iso3 === isoCode).fields; const dataTimestamp = data['curiexplore-timestamp']?.[0]?.fields; const campusFrance = dataPays?.cf_mobility;