Merged in feat/sw-3604-webviews (pull request #3123)
feat(SW-3604): wrap mystay with bookingflowconfig * feat(SW-3604): wrap mystay with bookingflowconfig Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -1,7 +1,3 @@
|
|||||||
import { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig"
|
|
||||||
|
|
||||||
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
|
|
||||||
|
|
||||||
import MyStay from "@/components/HotelReservation/MyStay"
|
import MyStay from "@/components/HotelReservation/MyStay"
|
||||||
import { setLang } from "@/i18n/serverContext"
|
import { setLang } from "@/i18n/serverContext"
|
||||||
|
|
||||||
@@ -18,9 +14,9 @@ export default async function MyStayPage(
|
|||||||
const refId = searchParams.RefId
|
const refId = searchParams.RefId
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BookingFlowConfig config={bookingFlowConfig}>
|
<>
|
||||||
<MyStay refId={refId} lang={params.lang} />
|
<MyStay refId={refId} lang={params.lang} />
|
||||||
<Tracking />
|
<Tracking />
|
||||||
</BookingFlowConfig>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { ToastHandler } from "@scandic-hotels/design-system/ToastHandler"
|
|||||||
|
|
||||||
import TrpcProvider from "@/lib/trpc/Provider"
|
import TrpcProvider from "@/lib/trpc/Provider"
|
||||||
|
|
||||||
|
import { BookingFlowProviders } from "@/components/BookingFlowProviders"
|
||||||
import RouteChange from "@/components/RouteChange"
|
import RouteChange from "@/components/RouteChange"
|
||||||
import AdobeSDKScript from "@/components/TrackingSDK/AdobeSDKScript"
|
import AdobeSDKScript from "@/components/TrackingSDK/AdobeSDKScript"
|
||||||
import GTMScript from "@/components/TrackingSDK/GTMScript"
|
import GTMScript from "@/components/TrackingSDK/GTMScript"
|
||||||
@@ -63,9 +64,11 @@ export default async function RootLayout(
|
|||||||
>
|
>
|
||||||
<NuqsAdapter>
|
<NuqsAdapter>
|
||||||
<TrpcProvider>
|
<TrpcProvider>
|
||||||
<RouteChange />
|
<BookingFlowProviders>
|
||||||
{children}
|
<RouteChange />
|
||||||
<ToastHandler />
|
{children}
|
||||||
|
<ToastHandler />
|
||||||
|
</BookingFlowProviders>
|
||||||
</TrpcProvider>
|
</TrpcProvider>
|
||||||
</NuqsAdapter>
|
</NuqsAdapter>
|
||||||
</ClientIntlProvider>
|
</ClientIntlProvider>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { cookies } from "next/headers"
|
import { cookies } from "next/headers"
|
||||||
import { notFound } from "next/navigation"
|
import { notFound } from "next/navigation"
|
||||||
|
|
||||||
|
import { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig"
|
||||||
import { filterOverlappingDates } from "@scandic-hotels/booking-flow/utils/SelectRate"
|
import { filterOverlappingDates } from "@scandic-hotels/booking-flow/utils/SelectRate"
|
||||||
import { dt } from "@scandic-hotels/common/dt"
|
import { dt } from "@scandic-hotels/common/dt"
|
||||||
import { logger } from "@scandic-hotels/common/logger"
|
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 { BreakfastPackageEnum } from "@scandic-hotels/trpc/enums/breakfast"
|
||||||
import { parseRefId } from "@scandic-hotels/trpc/utils/refId"
|
import { parseRefId } from "@scandic-hotels/trpc/utils/refId"
|
||||||
|
|
||||||
|
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
|
||||||
import { env } from "@/env/server"
|
import { env } from "@/env/server"
|
||||||
import {
|
import {
|
||||||
findBooking,
|
findBooking,
|
||||||
@@ -46,7 +48,19 @@ import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConf
|
|||||||
|
|
||||||
import type { SafeUser } from "@/types/user"
|
import type { SafeUser } from "@/types/user"
|
||||||
|
|
||||||
export default async function MyStay(props: {
|
export default function MyStayWrapper(props: {
|
||||||
|
refId?: string
|
||||||
|
lang: Lang
|
||||||
|
isWebview?: boolean
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<BookingFlowConfig config={bookingFlowConfig}>
|
||||||
|
<MyStay {...props} />
|
||||||
|
</BookingFlowConfig>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function MyStay(props: {
|
||||||
refId?: string
|
refId?: string
|
||||||
lang: Lang
|
lang: Lang
|
||||||
isWebview?: boolean
|
isWebview?: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user