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:
@@ -1,6 +1,8 @@
|
||||
import { SelectHotelMapPage as SelectHotelMapPagePrimitive } from "@scandic-hotels/booking-flow/pages/SelectHotelMapPage"
|
||||
import { toCapitalCase } from "@scandic-hotels/common/utils/toCapitalCase"
|
||||
|
||||
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
|
||||
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import type { Metadata } from "next"
|
||||
@@ -25,5 +27,11 @@ export default async function SelectHotelMapPage(props: PageArgs<LangParams>) {
|
||||
const searchParams = await props.searchParams
|
||||
const lang = await getLang()
|
||||
|
||||
return <SelectHotelMapPagePrimitive lang={lang} searchParams={searchParams} />
|
||||
return (
|
||||
<SelectHotelMapPagePrimitive
|
||||
lang={lang}
|
||||
searchParams={searchParams}
|
||||
config={bookingFlowConfig}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { SelectHotelPage as SelectHotelPagePrimitive } from "@scandic-hotels/booking-flow/pages/SelectHotelPage"
|
||||
import { toCapitalCase } from "@scandic-hotels/common/utils/toCapitalCase"
|
||||
|
||||
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
|
||||
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import type { Metadata } from "next"
|
||||
@@ -25,5 +27,11 @@ export default async function SelectHotelPage(props: PageArgs<LangParams>) {
|
||||
const searchParams = await props.searchParams
|
||||
const lang = await getLang()
|
||||
|
||||
return <SelectHotelPagePrimitive lang={lang} searchParams={searchParams} />
|
||||
return (
|
||||
<SelectHotelPagePrimitive
|
||||
lang={lang}
|
||||
searchParams={searchParams}
|
||||
config={bookingFlowConfig}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user