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:
Anton Gunnarsson
2025-10-22 07:04:21 +00:00
parent 2a28681259
commit c435cdba68
44 changed files with 398 additions and 237 deletions

View File

@@ -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 styles from "./page.module.css"
@@ -27,7 +29,11 @@ export default async function SelectHotelMapPage(
return (
<div className={styles.main}>
<SelectHotelMapPagePrimitive lang={lang} searchParams={searchParams} />
<SelectHotelMapPagePrimitive
lang={lang}
searchParams={searchParams}
config={bookingFlowConfig}
/>
</div>
)
}

View File

@@ -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"
@@ -23,5 +25,11 @@ export default async function SelectHotelPage(
const searchParams = await props.searchParams
const lang = await getLang()
return <SelectHotelPagePrimitive lang={lang} searchParams={searchParams} />
return (
<SelectHotelPagePrimitive
lang={lang}
searchParams={searchParams}
config={bookingFlowConfig}
/>
)
}