Merged in fix/sw-3551-rsc-bookingflowconfig (pull request #2988)
fix(SW-3551): Fix issue with BookingConfigProvider in RSC * wip move config to pages * Move config providing to pages
This commit is contained in:
@@ -3,6 +3,7 @@ import { notFound } from "next/navigation"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
import { SEARCH_TYPE_REDEMPTION } from "@scandic-hotels/trpc/constants/booking"
|
||||
|
||||
import { BookingFlowConfig } from "../bookingFlowConfig/bookingFlowConfig"
|
||||
import { SelectRate } from "../components/SelectRate"
|
||||
import { SelectRateTracking } from "../components/SelectRate/Tracking/SelectRateTracking"
|
||||
import { SelectRateProvider } from "../contexts/SelectRate/SelectRateContext"
|
||||
@@ -28,9 +29,11 @@ const singleRoomRateTypes = combineRegExps(
|
||||
export async function SelectRatePage({
|
||||
lang,
|
||||
searchParams,
|
||||
config,
|
||||
}: {
|
||||
lang: Lang
|
||||
searchParams: NextSearchParams
|
||||
config: BookingFlowConfig
|
||||
}) {
|
||||
const booking = parseSelectRateSearchParams(searchParams)
|
||||
|
||||
@@ -71,12 +74,12 @@ export async function SelectRatePage({
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<BookingFlowConfig config={config}>
|
||||
<SelectRateProvider hotelData={hotelData}>
|
||||
<SelectRate hotelData={hotelData} booking={booking} />
|
||||
<SelectRateTracking hotelData={hotelData} booking={booking} />
|
||||
</SelectRateProvider>
|
||||
</>
|
||||
</BookingFlowConfig>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user