feat: consume serach params in summary and step page
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import EnterDetailsProvider from "@/components/HotelReservation/EnterDetails/Provider"
|
||||
import SelectedRoom from "@/components/HotelReservation/EnterDetails/SelectedRoom"
|
||||
import Summary from "@/components/HotelReservation/EnterDetails/Summary"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
|
||||
import { preload } from "./page"
|
||||
@@ -11,6 +10,7 @@ import { StepEnum } from "@/types/components/hotelReservation/enterDetails/step"
|
||||
import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
|
||||
export default async function StepLayout({
|
||||
summary,
|
||||
children,
|
||||
hotelHeader,
|
||||
params,
|
||||
@@ -19,6 +19,7 @@ export default async function StepLayout({
|
||||
LayoutArgs<LangParams & { step: StepEnum }> & {
|
||||
hotelHeader: React.ReactNode
|
||||
sidePeek: React.ReactNode
|
||||
summary: React.ReactNode
|
||||
}>) {
|
||||
setLang(params.lang)
|
||||
preload()
|
||||
@@ -29,9 +30,7 @@ export default async function StepLayout({
|
||||
<div className={styles.content}>
|
||||
<SelectedRoom />
|
||||
{children}
|
||||
<aside className={styles.summary}>
|
||||
<Summary isMember={false} />
|
||||
</aside>
|
||||
<aside className={styles.summary}>{summary}</aside>
|
||||
</div>
|
||||
{sidePeek}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user