From 2e9806cf3deefc6836472881ea89611c9e0de4d4 Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Mon, 14 Aug 2023 16:42:51 +0300 Subject: [PATCH 1/4] fix: remove viro options from kela config --- app/configurations/config.kela.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/configurations/config.kela.js b/app/configurations/config.kela.js index f601d7ebeb..7d90ce92cc 100644 --- a/app/configurations/config.kela.js +++ b/app/configurations/config.kela.js @@ -27,6 +27,8 @@ export default configMerger(matkaConfig, { favicon: './app/configurations/images/default/favicon.png', feedIds: ['kela', 'matkahuolto'], + additionalFeedIds: undefined, + additionalSearchParams: undefined, textLogo: true, logo: null, // override default logo from matka config appBarLink: false, // override default config - would show Traficom otherwise @@ -96,6 +98,7 @@ export default configMerger(matkaConfig, { show: false, }, showEmbeddedSearch: false, + countrySelection: [], }, showNearYouButtons: false, hideFavourites: true, From 41855664e1c5a660814a4640ed675633d1608415 Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Mon, 14 Aug 2023 17:08:01 +0300 Subject: [PATCH 2/4] chore: make it easier to reset country selection menu --- app/configurations/config.kela.js | 2 -- app/util/configureCountry.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/configurations/config.kela.js b/app/configurations/config.kela.js index 7d90ce92cc..146fe10915 100644 --- a/app/configurations/config.kela.js +++ b/app/configurations/config.kela.js @@ -27,8 +27,6 @@ export default configMerger(matkaConfig, { favicon: './app/configurations/images/default/favicon.png', feedIds: ['kela', 'matkahuolto'], - additionalFeedIds: undefined, - additionalSearchParams: undefined, textLogo: true, logo: null, // override default logo from matka config appBarLink: false, // override default config - would show Traficom otherwise diff --git a/app/util/configureCountry.js b/app/util/configureCountry.js index 93442fd8e8..1eec2865d0 100644 --- a/app/util/configureCountry.js +++ b/app/util/configureCountry.js @@ -1,6 +1,6 @@ /* eslint-disable no-param-reassign */ export const configureCountry = (config, countries) => { - if (config.mainMenu.countrySelection) { + if (config.mainMenu.countrySelection?.length) { const selectedCountries = countries; const keys = Object.keys(selectedCountries); let boundaries = config.additionalSearchParams.default['boundary.country']; From 503635e7355468c59a711579d538b91b742b5d11 Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Mon, 14 Aug 2023 17:18:49 +0300 Subject: [PATCH 3/4] fix: remove unnecessary assignment --- app/util/configureCountry.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/util/configureCountry.js b/app/util/configureCountry.js index 1eec2865d0..3a712a9d3e 100644 --- a/app/util/configureCountry.js +++ b/app/util/configureCountry.js @@ -1,7 +1,6 @@ /* eslint-disable no-param-reassign */ -export const configureCountry = (config, countries) => { +export const configureCountry = (config, selectedCountries) => { if (config.mainMenu.countrySelection?.length) { - const selectedCountries = countries; const keys = Object.keys(selectedCountries); let boundaries = config.additionalSearchParams.default['boundary.country']; let feedIds = [...config.feedIds]; From 34b2dda0ecf1d5bdba8202cb95cd0fbae41eff6d Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Tue, 15 Aug 2023 10:40:24 +0300 Subject: [PATCH 4/4] Update app/util/configureCountry.js Co-authored-by: Joel Lappalainen --- app/util/configureCountry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/util/configureCountry.js b/app/util/configureCountry.js index 3a712a9d3e..1cdc7de180 100644 --- a/app/util/configureCountry.js +++ b/app/util/configureCountry.js @@ -1,6 +1,6 @@ /* eslint-disable no-param-reassign */ export const configureCountry = (config, selectedCountries) => { - if (config.mainMenu.countrySelection?.length) { + if (config.mainMenu.countrySelection?.length > 0) { const keys = Object.keys(selectedCountries); let boundaries = config.additionalSearchParams.default['boundary.country']; let feedIds = [...config.feedIds];