From e40803784cf203267afb0b6f138deb6255a90d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= <55186402+Clemog@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:25:13 +0100 Subject: [PATCH 1/2] fix: we use now 'en' for 'en-us' --- source/RulesProvider.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/RulesProvider.tsx b/source/RulesProvider.tsx index fb7021f4b..c5664f2ab 100644 --- a/source/RulesProvider.tsx +++ b/source/RulesProvider.tsx @@ -56,9 +56,7 @@ const EngineWrapper = ({ children }) => { const url = currLangAbrv && currentRegionCode && - `https://nosgestesclimat-api.osc-fr1.scalingo.io/1.0.5/${ - i18n.language === 'en' ? 'en-us' : currLangAbrv - }/${currentRegionCode}/${optimizedOption ? 'optim-rules' : 'rules'}` + `https://nosgestesclimat-api.osc-fr1.scalingo.io/1.0.5/${currLangAbrv}/${currentRegionCode}/${optimizedOption ? 'optim-rules' : 'rules'}` console.log('fetching:', url) fetch(url, { mode: 'cors' }) .then((response) => response.json()) From 79b8e8e834fb20ccad485f22c9ba60d6b0d49739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Tue, 16 Jan 2024 18:34:03 +0100 Subject: [PATCH 2/2] fix: prettier --- source/RulesProvider.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/RulesProvider.tsx b/source/RulesProvider.tsx index c5664f2ab..461fa66ce 100644 --- a/source/RulesProvider.tsx +++ b/source/RulesProvider.tsx @@ -56,7 +56,9 @@ const EngineWrapper = ({ children }) => { const url = currLangAbrv && currentRegionCode && - `https://nosgestesclimat-api.osc-fr1.scalingo.io/1.0.5/${currLangAbrv}/${currentRegionCode}/${optimizedOption ? 'optim-rules' : 'rules'}` + `https://nosgestesclimat-api.osc-fr1.scalingo.io/1.0.5/${currLangAbrv}/${currentRegionCode}/${ + optimizedOption ? 'optim-rules' : 'rules' + }` console.log('fetching:', url) fetch(url, { mode: 'cors' }) .then((response) => response.json())