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 { AlternativeHotelsPageTitle } from "../components/AlternativeHotelsPageTitle"
|
||||
import FnFNotAllowedAlert from "../components/FnFNotAllowedAlert"
|
||||
import { SelectHotel } from "../components/SelectHotel"
|
||||
@@ -25,9 +25,11 @@ export { SelectHotelSkeleton as AlternativeHotelsPageSkeleton } from "../compone
|
||||
export async function AlternativeHotelsPage({
|
||||
lang,
|
||||
searchParams,
|
||||
config,
|
||||
}: {
|
||||
lang: Lang
|
||||
searchParams: NextSearchParams
|
||||
config: BookingFlowConfig
|
||||
}) {
|
||||
const booking = parseSelectHotelSearchParams(searchParams)
|
||||
|
||||
@@ -108,7 +110,7 @@ export async function AlternativeHotelsPage({
|
||||
isBookingCodeRateAvailable,
|
||||
isRedemption: searchDetails.redemption,
|
||||
isRedemptionAvailable: isRedemptionAvailability,
|
||||
config: getBookingFlowConfig(),
|
||||
config,
|
||||
})
|
||||
|
||||
const suspenseKey = stringify(searchParams)
|
||||
@@ -118,7 +120,7 @@ export async function AlternativeHotelsPage({
|
||||
(booking.bookingCode && hotels.length > 0 && !isBookingCodeRateAvailable)
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<BookingFlowConfig config={config}>
|
||||
<SelectHotel
|
||||
bookingCode={booking.bookingCode}
|
||||
city={searchDetails.city}
|
||||
@@ -142,6 +144,6 @@ export async function AlternativeHotelsPage({
|
||||
shouldTrackNoAvailability={shouldTrackNoAvailability}
|
||||
/>
|
||||
</Suspense>
|
||||
</>
|
||||
</BookingFlowConfig>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user