Merged in chore/move-enter-details (pull request #2778)

Chore/move enter details

Approved-by: Anton Gunnarsson
This commit is contained in:
Joakim Jäderberg
2025-09-11 07:16:24 +00:00
parent 15711cb3a4
commit 7dee6d5083
238 changed files with 1656 additions and 1602 deletions

View File

@@ -2,6 +2,12 @@
import { createContext, useContext } from "react"
import type {
PaymentEvent,
TrackingPosition,
} from "@scandic-hotels/tracking/types"
import type { BreakfastPackages } from "@scandic-hotels/trpc/routers/hotels/output"
export type TrackingFunctions = {
trackBookingSearchClick: (
searchTerm: string,
@@ -15,6 +21,21 @@ export type TrackingFunctions = {
roomTypeCode?: string | null
}) => void
trackGenericEvent(data: any): void
trackLoginClick(position: TrackingPosition & (string & {})): void
trackPaymentEvent(payment: PaymentEvent): void
trackGlaSaveCardAttempt(args: {
hotelId: string
hasSavedCreditCard: boolean
creditCardType?: string
lateArrivalGuarantee: "mandatory" | "yes" | "no" | "na"
}): void
trackUpdatePaymentMethod(args: { method: string }): void
trackBreakfastSelection(args: {
breakfastPackage: BreakfastPackages[number]
hotelId: string
units: number
}): void
trackBedSelection(bedType: string): void
}
export const TrackingContext = createContext<TrackingFunctions | undefined>(