This commit is contained in:
Linus Flood
2024-12-13 08:20:25 +01:00
parent 115d1f0a10
commit 6b9f4f4fa9

View File

@@ -30,17 +30,17 @@ export default async function SelectRatePage({
}: PageArgs<LangParams & { section: string }, SelectRateSearchParams>) {
setLang(params.lang)
// const locations = await getLocations()
// if (!locations || "error" in locations) {
// return null
// }
// const hotel = locations.data.find(
// (location) =>
// "operaId" in location && location.operaId == searchParams.hotel
// )
// if (!hotel) {
// return notFound()
// }
const locations = await getLocations()
if (!locations || "error" in locations) {
return null
}
const hotel = locations.data.find(
(location) =>
"operaId" in location && location.operaId == searchParams.hotel
)
if (!hotel) {
return notFound()
}
const selectRoomParams = new URLSearchParams(searchParams)
const selectRoomParamsObject =
getHotelReservationQueryParams(selectRoomParams)