From ecb25cf6cd9a757bdde1b22a044bf14de283f069 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Tue, 11 Nov 2025 09:37:54 +0000 Subject: [PATCH] Merged in feat/sw-3604-webviews (pull request #3123) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(SW-3604): wrap mystay with bookingflowconfig * feat(SW-3604): wrap mystay with bookingflowconfig Approved-by: Joakim Jäderberg --- .../(public)/hotelreservation/my-stay/page.tsx | 8 ++------ apps/scandic-web/app/[lang]/webview/layout.tsx | 9 ++++++--- .../components/HotelReservation/MyStay/index.tsx | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/my-stay/page.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/my-stay/page.tsx index e4cec7202..4eedbbc71 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/my-stay/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/my-stay/page.tsx @@ -1,7 +1,3 @@ -import { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig" - -import { bookingFlowConfig } from "@/constants/bookingFlowConfig" - import MyStay from "@/components/HotelReservation/MyStay" import { setLang } from "@/i18n/serverContext" @@ -18,9 +14,9 @@ export default async function MyStayPage( const refId = searchParams.RefId return ( - + <> - + ) } diff --git a/apps/scandic-web/app/[lang]/webview/layout.tsx b/apps/scandic-web/app/[lang]/webview/layout.tsx index ff5e44cec..c00edb0df 100644 --- a/apps/scandic-web/app/[lang]/webview/layout.tsx +++ b/apps/scandic-web/app/[lang]/webview/layout.tsx @@ -14,6 +14,7 @@ import { ToastHandler } from "@scandic-hotels/design-system/ToastHandler" import TrpcProvider from "@/lib/trpc/Provider" +import { BookingFlowProviders } from "@/components/BookingFlowProviders" import RouteChange from "@/components/RouteChange" import AdobeSDKScript from "@/components/TrackingSDK/AdobeSDKScript" import GTMScript from "@/components/TrackingSDK/GTMScript" @@ -63,9 +64,11 @@ export default async function RootLayout( > - - {children} - + + + {children} + + diff --git a/apps/scandic-web/components/HotelReservation/MyStay/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/index.tsx index 31a189fe2..aeedfc1d8 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/index.tsx @@ -1,6 +1,7 @@ import { cookies } from "next/headers" import { notFound } from "next/navigation" +import { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig" import { filterOverlappingDates } from "@scandic-hotels/booking-flow/utils/SelectRate" import { dt } from "@scandic-hotels/common/dt" import { logger } from "@scandic-hotels/common/logger" @@ -10,6 +11,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography" import { BreakfastPackageEnum } from "@scandic-hotels/trpc/enums/breakfast" import { parseRefId } from "@scandic-hotels/trpc/utils/refId" +import { bookingFlowConfig } from "@/constants/bookingFlowConfig" import { env } from "@/env/server" import { findBooking, @@ -46,7 +48,19 @@ import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConf import type { SafeUser } from "@/types/user" -export default async function MyStay(props: { +export default function MyStayWrapper(props: { + refId?: string + lang: Lang + isWebview?: boolean +}) { + return ( + + + + ) +} + +async function MyStay(props: { refId?: string lang: Lang isWebview?: boolean