Merged in feat/sw-3207-refactor-select-hotel-tracking (pull request #2587)
feat(SW-3207): Refactor select-hotel tracking * Refactor select-hotel tracking Approved-by: Bianca Widstam
This commit is contained in:
@@ -28,11 +28,8 @@ export default async function SelectRatePage({
|
||||
return notFound()
|
||||
}
|
||||
|
||||
const { adultsInRoom, childrenInRoom, hotel, noOfRooms, bookingCode } =
|
||||
searchDetails
|
||||
|
||||
const hotelData = await getHotel({
|
||||
hotelId: hotel.id,
|
||||
hotelId: searchDetails.hotel.id,
|
||||
isCardOnlyPayment: false,
|
||||
language: lang,
|
||||
})
|
||||
@@ -42,10 +39,14 @@ export default async function SelectRatePage({
|
||||
}
|
||||
|
||||
let isInValidFNF = false
|
||||
if (bookingCode && FamilyAndFriendsCodes.includes(bookingCode)) {
|
||||
if (
|
||||
booking.bookingCode &&
|
||||
FamilyAndFriendsCodes.includes(booking.bookingCode)
|
||||
) {
|
||||
const cookieStore = await cookies()
|
||||
isInValidFNF = cookieStore.get("sc")?.value !== "1"
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<HotelInfoCard booking={booking} hotel={hotelData.hotel} />
|
||||
@@ -61,11 +62,8 @@ export default async function SelectRatePage({
|
||||
)}
|
||||
|
||||
<Tracking
|
||||
adultsInRoom={adultsInRoom}
|
||||
childrenInRoom={childrenInRoom}
|
||||
hotelId={hotel.id}
|
||||
hotelName={hotel.name}
|
||||
noOfRooms={noOfRooms}
|
||||
hotelId={searchDetails.hotel.id}
|
||||
hotelName={searchDetails.hotel.name}
|
||||
country={hotelData.hotel.address.country}
|
||||
city={hotelData.hotel.address.city}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user