Files
web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/map/page.tsx
Linus Flood c0f5c0278b Merged in feat/skeletons-and-cache (pull request #1273)
feat: skeleton key bullet proof. 10 min cache on city search response

* feat: skeleton key bullet proof. 10 min cache on city search response

* Refactor server.ts


Approved-by: Michael Zetterberg
2025-02-07 07:02:53 +00:00

32 lines
1.1 KiB
TypeScript

import { Suspense } from "react"
import { SelectHotelMapContainer } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainer"
import { SelectHotelMapContainerSkeleton } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainerSkeleton"
import { MapContainer } from "@/components/MapContainer"
import { setLang } from "@/i18n/serverContext"
import styles from "./page.module.css"
import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
import type { LangParams, PageArgs } from "@/types/params"
export default async function SelectHotelMapPage({
params,
searchParams,
}: PageArgs<LangParams, SelectHotelSearchParams>) {
setLang(params.lang)
return (
<div className={styles.main}>
<MapContainer>
<Suspense
key={JSON.stringify(searchParams)}
fallback={<SelectHotelMapContainerSkeleton />}
>
<SelectHotelMapContainer searchParams={searchParams} />
</Suspense>
</MapContainer>
</div>
)
}