Refactor: removed parallel routes for header, footer and sidewidealert. Langswitcher and sidewidealert now client components * feat - removed parallel routes and made sidepeek and sitewidealerts as client components * Langswitcher as client component * Fixed lang switcher for current header * Passing lang when fetching siteconfig * Merge branch 'master' into feat/refactor-header-footer-sitewidealert * Refactor * Removed dead code * Show only languages that has translation * Refetch sitewidealert every 60 seconds * Merge branch 'master' into feat/refactor-header-footer-sitewidealert * Removed sidepeek parallel route from my-stay * Added missing env.var to env.test * Removed console.log Approved-by: Joakim Jäderberg
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import stringify from "json-stable-stringify-without-jsonify"
|
|
import { Suspense } from "react"
|
|
|
|
import SelectRate from "@/components/HotelReservation/SelectRate"
|
|
import { HotelInfoCardSkeleton } from "@/components/HotelReservation/SelectRate/HotelInfoCard"
|
|
import { RoomsContainerSkeleton } from "@/components/HotelReservation/SelectRate/RoomsContainer/RoomsContainerSkeleton"
|
|
import { setLang } from "@/i18n/serverContext"
|
|
|
|
import type { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate"
|
|
import type { LangParams, PageArgs } from "@/types/params"
|
|
|
|
export default async function SelectRatePage({
|
|
params,
|
|
searchParams,
|
|
}: PageArgs<LangParams & { section: string }, SelectRateSearchParams>) {
|
|
setLang(params.lang)
|
|
|
|
const suspenseKey = stringify(searchParams)
|
|
|
|
return (
|
|
<Suspense
|
|
key={suspenseKey}
|
|
fallback={
|
|
<>
|
|
<HotelInfoCardSkeleton />
|
|
<RoomsContainerSkeleton />
|
|
</>
|
|
}
|
|
>
|
|
<SelectRate params={params} searchParams={searchParams} />
|
|
</Suspense>
|
|
)
|
|
}
|