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:
@@ -13,24 +13,16 @@ import TrackingSDK from "@/components/TrackingSDK"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import { getValidDates } from "../getValidDates"
|
||||
import { getTracking } from "./tracking"
|
||||
|
||||
import type { ChildrenInRoom } from "@/utils/hotelSearchDetails"
|
||||
import { getSelectRateTracking } from "./tracking"
|
||||
|
||||
export default function Tracking({
|
||||
adultsInRoom,
|
||||
childrenInRoom,
|
||||
hotelId,
|
||||
hotelName,
|
||||
noOfRooms,
|
||||
country,
|
||||
city,
|
||||
}: {
|
||||
adultsInRoom: number[]
|
||||
childrenInRoom: ChildrenInRoom
|
||||
hotelId: string
|
||||
hotelName: string
|
||||
noOfRooms: number
|
||||
country: string
|
||||
city: string
|
||||
}) {
|
||||
@@ -47,22 +39,19 @@ export default function Tracking({
|
||||
const arrivalDate = fromDate.toDate()
|
||||
const departureDate = toDate.toDate()
|
||||
|
||||
const { hotelsTrackingData, pageTrackingData } = getTracking(
|
||||
const { hotelsTrackingData, pageTrackingData } = getSelectRateTracking({
|
||||
lang,
|
||||
arrivalDate,
|
||||
departureDate,
|
||||
adultsInRoom,
|
||||
childrenInRoom,
|
||||
hotelId,
|
||||
hotelName,
|
||||
noOfRooms,
|
||||
country,
|
||||
city,
|
||||
hotelCity: city,
|
||||
paramCity,
|
||||
bookingCode,
|
||||
searchType === SEARCH_TYPE_REDEMPTION,
|
||||
rooms
|
||||
)
|
||||
isRedemption: searchType === SEARCH_TYPE_REDEMPTION,
|
||||
rooms,
|
||||
})
|
||||
|
||||
return (
|
||||
<TrackingSDK pageData={pageTrackingData} hotelInfo={hotelsTrackingData} />
|
||||
|
||||
Reference in New Issue
Block a user