refactor: url management in hotel reservation flow
This commit is contained in:
@@ -20,8 +20,13 @@ export default async function SelectHotelMapPage({
|
||||
setLang(params.lang)
|
||||
const searchDetails = await getHotelSearchDetails({ searchParams })
|
||||
if (!searchDetails) return notFound()
|
||||
const { city, adultsInRoom, childrenInRoom, childrenInRoomArray } =
|
||||
searchDetails
|
||||
const {
|
||||
city,
|
||||
adultsInRoom,
|
||||
childrenInRoom,
|
||||
childrenInRoomArray,
|
||||
selectHotelParams,
|
||||
} = searchDetails
|
||||
|
||||
if (!city) return notFound()
|
||||
|
||||
@@ -34,7 +39,7 @@ export default async function SelectHotelMapPage({
|
||||
>
|
||||
<SelectHotelMapContainer
|
||||
city={city}
|
||||
searchParams={searchParams}
|
||||
selectHotelParams={selectHotelParams}
|
||||
adultsInRoom={adultsInRoom}
|
||||
childrenInRoom={childrenInRoom}
|
||||
child={childrenInRoomArray}
|
||||
|
||||
@@ -3,7 +3,6 @@ import { Suspense } from "react"
|
||||
|
||||
import SelectHotel from "@/components/HotelReservation/SelectHotel"
|
||||
import { SelectHotelSkeleton } from "@/components/HotelReservation/SelectHotel/SelectHotelSkeleton"
|
||||
import { getHotelReservationQueryParams } from "@/components/HotelReservation/SelectRate/RoomSelection/utils"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
|
||||
import { getHotelSearchDetails } from "../utils"
|
||||
@@ -20,7 +19,7 @@ export default async function SelectHotelPage({
|
||||
if (!searchDetails) return notFound()
|
||||
const {
|
||||
city,
|
||||
urlSearchParams,
|
||||
selectHotelParams,
|
||||
adultsInRoom,
|
||||
childrenInRoom,
|
||||
childrenInRoomArray,
|
||||
@@ -29,8 +28,7 @@ export default async function SelectHotelPage({
|
||||
if (!city) return notFound()
|
||||
|
||||
const reservationParams = {
|
||||
selectHotelParams: urlSearchParams,
|
||||
searchParams,
|
||||
selectHotelParams,
|
||||
adultsInRoom,
|
||||
childrenInRoom,
|
||||
childrenInRoomArray,
|
||||
|
||||
Reference in New Issue
Block a user