Files
web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx
Joakim Jäderberg 873183ec2f * move setLang() to a root layout
* 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
2025-02-19 09:06:37 +00:00

22 lines
784 B
TypeScript

import stringify from "json-stable-stringify-without-jsonify"
import { Suspense } from "react"
import SelectHotel from "@/components/HotelReservation/SelectHotel"
import { SelectHotelSkeleton } from "@/components/HotelReservation/SelectHotel/SelectHotelSkeleton"
import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
import type { LangParams, PageArgs } from "@/types/params"
export default async function SelectHotelPage({
params,
searchParams,
}: PageArgs<LangParams, SelectHotelSearchParams>) {
const suspenseKey = stringify(searchParams)
return (
<Suspense key={suspenseKey} fallback={<SelectHotelSkeleton />}>
<SelectHotel params={params} searchParams={searchParams} />
</Suspense>
)
}