Merged in fix/BOOK-459-tracking-search (pull request #2984)
fix(BOOK-459): update searchTerm to city or hotelname * fix(BOOK-459): update searchTerm to city or hotelname Approved-by: Erik Tiekstra
This commit is contained in:
@@ -7,6 +7,7 @@ import { useIntl } from "react-intl"
|
||||
import { useSessionId } from "@scandic-hotels/common/hooks/useSessionId"
|
||||
import { toast } from "@scandic-hotels/design-system/Toast"
|
||||
import { trackNoAvailability } from "@scandic-hotels/tracking/NoAvailabilityTracking"
|
||||
import { SEARCH_TYPE_REDEMPTION } from "@scandic-hotels/trpc/constants/booking"
|
||||
import { BookingErrorCodeEnum } from "@scandic-hotels/trpc/enums/bookingErrorCode"
|
||||
|
||||
import useLang from "../../hooks/useLang"
|
||||
@@ -16,9 +17,13 @@ import type { SelectRateBooking } from "../../types/components/selectRate/select
|
||||
|
||||
type AvailabilityErrorProps = {
|
||||
booking: SelectRateBooking
|
||||
hotelName: string
|
||||
}
|
||||
|
||||
export default function AvailabilityError({ booking }: AvailabilityErrorProps) {
|
||||
export default function AvailabilityError({
|
||||
booking,
|
||||
hotelName,
|
||||
}: AvailabilityErrorProps) {
|
||||
const intl = useIntl()
|
||||
const pathname = usePathname()
|
||||
const searchParams = useSearchParams()
|
||||
@@ -53,13 +58,14 @@ export default function AvailabilityError({ booking }: AvailabilityErrorProps) {
|
||||
|
||||
trackNoAvailability({
|
||||
specialRoomType,
|
||||
searchTerm: hotelId,
|
||||
searchTerm: hotelName,
|
||||
lang,
|
||||
fromDate,
|
||||
toDate,
|
||||
noOfRooms: rooms.length,
|
||||
searchType,
|
||||
searchType: "hotel",
|
||||
hotelId,
|
||||
rewardNight: searchType === SEARCH_TYPE_REDEMPTION ? "yes" : "no",
|
||||
bookingCode,
|
||||
pageId: "select-rate",
|
||||
pageName: "hotelreservation|select-rate",
|
||||
@@ -70,11 +76,12 @@ export default function AvailabilityError({ booking }: AvailabilityErrorProps) {
|
||||
})
|
||||
}, [
|
||||
rooms,
|
||||
hotelId,
|
||||
hotelName,
|
||||
lang,
|
||||
fromDate,
|
||||
toDate,
|
||||
searchType,
|
||||
hotelId,
|
||||
bookingCode,
|
||||
sessionId,
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user