Merged in feat/sw-397-alternative-hotels (pull request #1211) Feat/sw 397 alternative hotels * fix(SW-397): create alternative hotels page * update types * Adapt to new changes for fetching data * Make bookingcode optional * Code review fixes Approved-by: Simon.Emanuelsson
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { notFound } from "next/navigation"
|
|
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 { getHotelSearchDetails } from "../../utils"
|
|
|
|
import styles from "./page.module.css"
|
|
|
|
import type { AlternativeHotelsSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
|
|
import type { LangParams, PageArgs } from "@/types/params"
|
|
|
|
export default async function SelectHotelMapPage({
|
|
params,
|
|
searchParams,
|
|
}: PageArgs<LangParams, AlternativeHotelsSearchParams>) {
|
|
setLang(params.lang)
|
|
|
|
return (
|
|
<div className={styles.main}>
|
|
<MapContainer>
|
|
<Suspense
|
|
key={searchParams.hotel}
|
|
fallback={<SelectHotelMapContainerSkeleton />}
|
|
>
|
|
<SelectHotelMapContainer
|
|
searchParams={searchParams}
|
|
isAlternativeHotels
|
|
/>
|
|
</Suspense>
|
|
</MapContainer>
|
|
</div>
|
|
)
|
|
}
|