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:
@@ -7,7 +7,7 @@ import { FamilyAndFriendsCodes } from "@scandic-hotels/common/constants/familyAn
|
||||
import { NoAvailabilityTracking } from "@scandic-hotels/tracking/NoAvailabilityTracking"
|
||||
import { TrackingSDK } from "@scandic-hotels/tracking/TrackingSDK"
|
||||
|
||||
import { getBookingFlowConfig } from "../bookingFlowConfig/bookingFlowConfig"
|
||||
import { BookingFlowConfig } from "../bookingFlowConfig/bookingFlowConfig"
|
||||
import FnFNotAllowedAlert from "../components/FnFNotAllowedAlert"
|
||||
import { SelectHotel } from "../components/SelectHotel"
|
||||
import { getHotels } from "../components/SelectHotel/helpers"
|
||||
@@ -24,9 +24,11 @@ export { SelectHotelSkeleton as SelectHotelPageSkeleton } from "../components/Se
|
||||
export async function SelectHotelPage({
|
||||
lang,
|
||||
searchParams,
|
||||
config,
|
||||
}: {
|
||||
lang: Lang
|
||||
searchParams: NextSearchParams
|
||||
config: BookingFlowConfig
|
||||
}) {
|
||||
const booking = parseSelectHotelSearchParams(searchParams)
|
||||
|
||||
@@ -94,7 +96,7 @@ export async function SelectHotelPage({
|
||||
isBookingCodeRateAvailable,
|
||||
isRedemption: redemption,
|
||||
isRedemptionAvailable: isRedemptionAvailability,
|
||||
config: getBookingFlowConfig(),
|
||||
config,
|
||||
})
|
||||
|
||||
const suspenseKey = stringify(searchParams)
|
||||
@@ -105,7 +107,7 @@ export async function SelectHotelPage({
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<BookingFlowConfig config={config}>
|
||||
<SelectHotel
|
||||
bookingCode={booking.bookingCode}
|
||||
isBookingCodeRateAvailable={isBookingCodeRateAvailable}
|
||||
@@ -126,6 +128,6 @@ export async function SelectHotelPage({
|
||||
shouldTrackNoAvailability={shouldTrackNoAvailability}
|
||||
/>
|
||||
</Suspense>
|
||||
</>
|
||||
</BookingFlowConfig>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user