From 78cef80de08971268e0902cafc1c74d016c907d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matilda=20Landstr=C3=B6m?= Date: Wed, 7 May 2025 10:25:50 +0000 Subject: [PATCH] Merged in fix/explore-countrypages (pull request #1989) Fix(SW-2513): Explore all hotels - country page links not showing * fix: fix issue with country page urls Approved-by: Michael Zetterberg Approved-by: Erik Tiekstra --- .../destinationOverviewPage/destinations-da.json | 5 +++++ .../destinationOverviewPage/destinations-de.json | 6 ++++++ .../destinationOverviewPage/destinations-fi.json | 6 ++++++ .../destinationOverviewPage/destinations-no.json | 5 +++++ .../destinationOverviewPage/destinations-sv.json | 5 +++++ .../routers/contentstack/destinationOverviewPage/query.ts | 4 +++- 6 files changed, 30 insertions(+), 1 deletion(-) diff --git a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-da.json b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-da.json index bab7239ae..67b3559ed 100644 --- a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-da.json +++ b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-da.json @@ -1,6 +1,7 @@ [ { "country": "Danmark", + "countryUrl": "/da/destinationer/danmark", "numberOfHotels": 27, "cities": [ { @@ -289,6 +290,7 @@ }, { "country": "Norge", + "countryUrl": "/da/destinationer/norge", "numberOfHotels": 82, "cities": [ { @@ -567,6 +569,7 @@ }, { "country": "Polen", + "countryUrl": "/da/destinationer/polen", "numberOfHotels": 2, "cities": [ { @@ -587,6 +590,7 @@ }, { "country": "Sverige", + "countryUrl": "/da/destinationer/sverige", "numberOfHotels": 88, "cities": [ { @@ -889,6 +893,7 @@ }, { "country": "Tyskland", + "countryUrl": "/da/destinationer/tyskland", "numberOfHotels": 6, "cities": [ { diff --git a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-de.json b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-de.json index 39f05a59c..1701d3dba 100644 --- a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-de.json +++ b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-de.json @@ -1,6 +1,7 @@ [ { "country": "Dänemark", + "countryUrl": "/de/reiseziele/danemark", "numberOfHotels": 27, "cities": [ { @@ -105,6 +106,7 @@ }, { "country": "Deutschland", + "countryUrl": "/de/reiseziele/deutschland", "numberOfHotels": 6, "cities": [ { @@ -139,6 +141,7 @@ }, { "country": "Finnland", + "countryUrl": "/de/reiseziele/finnland", "numberOfHotels": 52, "cities": [ { @@ -322,6 +325,7 @@ }, { "country": "Norwegen", + "countryUrl": "/de/reiseziele/norwegen", "numberOfHotels": 82, "cities": [ { @@ -600,6 +604,7 @@ }, { "country": "Polen", + "countryUrl": "/de/reiseziele/polen", "numberOfHotels": 2, "cities": [ { @@ -620,6 +625,7 @@ }, { "country": "Schweden", + "countryUrl": "/de/reiseziele/schweden", "numberOfHotels": 88, "cities": [ { diff --git a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-fi.json b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-fi.json index 4be542c71..5fd461f85 100644 --- a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-fi.json +++ b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-fi.json @@ -1,6 +1,7 @@ [ { "country": "Norja", + "countryUrl": "/fi/kohteet/norja", "numberOfHotels": 82, "cities": [ { @@ -279,6 +280,7 @@ }, { "country": "Puola", + "countryUrl": "/fi/kohteet/puola", "numberOfHotels": 2, "cities": [ { @@ -299,6 +301,7 @@ }, { "country": "Ruotsi", + "countryUrl": "/fi/kohteet/ruotsi", "numberOfHotels": 88, "cities": [ { @@ -601,6 +604,7 @@ }, { "country": "Saksa", + "countryUrl": "/fi/kohteet/saksa", "numberOfHotels": 6, "cities": [ { @@ -635,6 +639,7 @@ }, { "country": "Suomi", + "countryUrl": "/fi/kohteet/suomi", "numberOfHotels": 52, "cities": [ { @@ -818,6 +823,7 @@ }, { "country": "Tanska", + "countryUrl": "/fi/kohteet/tanska", "numberOfHotels": 27, "cities": [ { diff --git a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-no.json b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-no.json index 477a90dbe..6cd67151c 100644 --- a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-no.json +++ b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-no.json @@ -1,6 +1,7 @@ [ { "country": "Danmark", + "countryUrl": "/no/destinasjoner/danmark", "numberOfHotels": 27, "cities": [ { @@ -289,6 +290,7 @@ }, { "country": "Norge", + "countryUrl": "/no/destinasjoner/norge", "numberOfHotels": 82, "cities": [ { @@ -567,6 +569,7 @@ }, { "country": "Polen", + "countryUrl": "/no/destinasjoner/polen", "numberOfHotels": 2, "cities": [ { @@ -587,6 +590,7 @@ }, { "country": "Sverige", + "countryUrl": "/no/destinasjoner/sverige", "numberOfHotels": 88, "cities": [ { @@ -889,6 +893,7 @@ }, { "country": "Tyskland", + "countryUrl": "/no/destinasjoner/tyskland", "numberOfHotels": 6, "cities": [ { diff --git a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-sv.json b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-sv.json index 6444e4160..bbe5d11fb 100644 --- a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-sv.json +++ b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/destinations-sv.json @@ -1,6 +1,7 @@ [ { "country": "Danmark", + "countryUrl": "/sv/destinationer/danmark", "numberOfHotels": 27, "cities": [ { @@ -289,6 +290,7 @@ }, { "country": "Norge", + "countryUrl": "/sv/destinationer/norge", "numberOfHotels": 82, "cities": [ { @@ -567,6 +569,7 @@ }, { "country": "Polen", + "countryUrl": "/sv/destinationer/polen", "numberOfHotels": 2, "cities": [ { @@ -587,6 +590,7 @@ }, { "country": "Sverige", + "countryUrl": "/sv/destinationer/sweden", "numberOfHotels": 88, "cities": [ { @@ -889,6 +893,7 @@ }, { "country": "Tyskland", + "countryUrl": "/sv/destinationer/tyskland", "numberOfHotels": 6, "cities": [ { diff --git a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/query.ts b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/query.ts index 04d35fa7e..a87813ad0 100644 --- a/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/query.ts +++ b/apps/scandic-web/server/routers/contentstack/destinationOverviewPage/query.ts @@ -41,6 +41,7 @@ import { TrackingChannelEnum, type TrackingSDKPageData, } from "@/types/components/tracking" +import { ApiCountry, type Country } from "@/types/enums/country" import type { GetDestinationOverviewPageData, GetDestinationOverviewPageRefsSchema, @@ -241,7 +242,8 @@ export const destinationOverviewPageQueryRouter = router({ const countryPages = await getCountryPageUrls(lang) const countryPage = countryPages.find( - (countryPage) => countryPage.country === country + (countryPage) => + ApiCountry[lang][countryPage.country as Country] === country ) return {