fixed issue where city and hotel is undefined or null
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { notFound } from "next/navigation"
|
||||
import { Suspense } from "react"
|
||||
|
||||
import { SelectHotelMapContainer } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainer"
|
||||
@@ -18,9 +19,11 @@ export default async function SelectHotelMapPage({
|
||||
}: PageArgs<LangParams, SelectHotelSearchParams>) {
|
||||
setLang(params.lang)
|
||||
const searchDetails = await getHotelSearchDetails({ searchParams })
|
||||
if (!searchDetails) return null
|
||||
if (!searchDetails) return notFound()
|
||||
const { city, adultsInRoom, childrenInRoom } = searchDetails
|
||||
|
||||
if (!city) return notFound()
|
||||
|
||||
return (
|
||||
<div className={styles.main}>
|
||||
<MapContainer>
|
||||
|
||||
Reference in New Issue
Block a user