From bdc44898d91a555a5518f8d3e4ff9774c62c403f Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Tue, 14 Oct 2025 08:41:15 +0000 Subject: [PATCH] Merged in feat/SW-3540-fix-hotel-details-link-to-go- (pull request #2959) feat SW-3540 Fixed route for hotel details link in sidepeek Approved-by: Anton Gunnarsson --- .../HotelSidePeekContent/index.tsx | 9 +++++++-- .../booking-flow/lib/utils/routeToScandicWebUrl.ts | 12 ++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 packages/booking-flow/lib/utils/routeToScandicWebUrl.ts diff --git a/packages/booking-flow/lib/components/HotelDetailsSidePeek/HotelSidePeekContent/index.tsx b/packages/booking-flow/lib/components/HotelDetailsSidePeek/HotelSidePeekContent/index.tsx index 558fa2a0a..9ea5f01eb 100644 --- a/packages/booking-flow/lib/components/HotelDetailsSidePeek/HotelSidePeekContent/index.tsx +++ b/packages/booking-flow/lib/components/HotelDetailsSidePeek/HotelSidePeekContent/index.tsx @@ -7,6 +7,8 @@ import { IconName } from "@scandic-hotels/design-system/Icons/iconName" import { Typography } from "@scandic-hotels/design-system/Typography" import { trackAccordionClick } from "@scandic-hotels/tracking/componentEvents" +import { useBookingFlowConfig } from "../../../bookingFlowConfig/bookingFlowConfigContext" +import { routeToScandicWebUrl } from "../../../utils/routeToScandicWebUrl" import AdditionalAmenities from "../../AdditionalAmenities" import Contact from "../../Contact" import BreakfastAccordionItem from "../../SidePeekAccordions/BreakfastAccordionItem" @@ -33,6 +35,9 @@ export function HotelSidePeekContent({ additionalHotelData, }: HotelSidePeekContentProps) { const intl = useIntl() + const isScandicPartner = useBookingFlowConfig().variant !== "scandic" + const hotelUrl = + isScandicPartner && hotel.url ? routeToScandicWebUrl(hotel.url) : hotel.url return (
@@ -58,9 +63,9 @@ export function HotelSidePeekContent({ /> - {hotel.url ? ( + {hotelUrl ? (