fix: wrap MyStay component in BookingFlowConfig to handle RSC problem where config is not set * fix: wrap MyStay component in BookingFlowConfig to handle RSC problem where config is not set Approved-by: Bianca Widstam
27 lines
753 B
TypeScript
27 lines
753 B
TypeScript
import { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig"
|
|
|
|
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
|
|
|
|
import MyStay from "@/components/HotelReservation/MyStay"
|
|
import { setLang } from "@/i18n/serverContext"
|
|
|
|
import Tracking from "./tracking"
|
|
|
|
import type { LangParams, PageArgs } from "@/types/params"
|
|
|
|
export default async function MyStayPage(
|
|
props: PageArgs<LangParams, { RefId?: string }>
|
|
) {
|
|
const searchParams = await props.searchParams
|
|
const params = await props.params
|
|
setLang(params.lang)
|
|
const refId = searchParams.RefId
|
|
|
|
return (
|
|
<BookingFlowConfig config={bookingFlowConfig}>
|
|
<MyStay refId={refId} lang={params.lang} />
|
|
<Tracking />
|
|
</BookingFlowConfig>
|
|
)
|
|
}
|