Merged in fix/SW-2668-tracking-room-details-missing (pull request #2015)
fix(SW-2668): added search term and room details to tracking * fix(SW-2668): added search term and room details to tracking * fix: change to optional type Approved-by: Christian Andolf Approved-by: Matilda Landström
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { useEnterDetailsStore } from "@/stores/enter-details"
|
||||
|
||||
import TrackingSDK from "@/components/TrackingSDK"
|
||||
import { useSearchHistory } from "@/hooks/useSearchHistory"
|
||||
|
||||
import { getTracking } from "./tracking"
|
||||
|
||||
@@ -16,7 +17,6 @@ interface TrackingWrapperProps {
|
||||
booking: SelectHotelParams<SelectRateSearchParams>
|
||||
hotel: Hotel
|
||||
rooms: Room[]
|
||||
city: string | undefined
|
||||
isMember: boolean
|
||||
lang: Lang
|
||||
}
|
||||
@@ -25,7 +25,6 @@ export default function EnterDetailsTrackingWrapper({
|
||||
booking,
|
||||
hotel,
|
||||
rooms,
|
||||
city,
|
||||
isMember,
|
||||
lang,
|
||||
}: TrackingWrapperProps) {
|
||||
@@ -34,15 +33,18 @@ export default function EnterDetailsTrackingWrapper({
|
||||
breakfastPackages: state.breakfastPackages,
|
||||
}))
|
||||
|
||||
const searchHistory = useSearchHistory()
|
||||
const searchTerm = searchHistory.searchHistory[0]?.name
|
||||
|
||||
const { hotelsTrackingData, pageTrackingData, ancillaries } = getTracking(
|
||||
booking,
|
||||
hotel,
|
||||
rooms,
|
||||
city,
|
||||
isMember,
|
||||
lang,
|
||||
storedRooms,
|
||||
breakfastPackages
|
||||
breakfastPackages,
|
||||
searchTerm
|
||||
)
|
||||
return (
|
||||
<TrackingSDK
|
||||
|
||||
Reference in New Issue
Block a user