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:
@@ -6,6 +6,7 @@ import { useBookingConfirmationStore } from "@/stores/booking-confirmation"
|
||||
|
||||
import TrackingSDK from "@/components/TrackingSDK"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { useSearchHistory } from "@/hooks/useSearchHistory"
|
||||
|
||||
import { getTracking } from "./tracking"
|
||||
|
||||
@@ -33,6 +34,9 @@ export default function Tracking({
|
||||
sessionStorage.setItem("loadedBookingConfirmationRefId", refId)
|
||||
}, [refId])
|
||||
|
||||
const searchHistory = useSearchHistory()
|
||||
const searchTerm = searchHistory.searchHistory[0]?.name
|
||||
|
||||
if (!bookingRooms.every(Boolean)) {
|
||||
return null
|
||||
}
|
||||
@@ -44,7 +48,8 @@ export default function Tracking({
|
||||
lang,
|
||||
bookingConfirmation.booking,
|
||||
bookingConfirmation.hotel,
|
||||
rooms
|
||||
rooms,
|
||||
searchTerm
|
||||
)
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user