* fix: findLang only returns acceptable languages * fix: fallback to use header x-lang if we haven't setLang yet * fix: languageSchema, allow uppercase Approved-by: Linus Flood
31 lines
998 B
TypeScript
31 lines
998 B
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 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>) {
|
|
const suspenseKey = stringify(searchParams)
|
|
|
|
return (
|
|
<Suspense
|
|
key={suspenseKey}
|
|
fallback={
|
|
<>
|
|
<HotelInfoCardSkeleton />
|
|
<RoomsContainerSkeleton />
|
|
</>
|
|
}
|
|
>
|
|
<SelectRate params={params} searchParams={searchParams} />
|
|
</Suspense>
|
|
)
|
|
}
|