Merged in feat/sw-3473-remove-tracking-context (pull request #2843)
feat(SW-3473): Rework booking-flow tracking provider * Remove tracking context and import instead * Remove unused file Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -1,21 +1,8 @@
|
||||
"use client"
|
||||
|
||||
import { BookingFlowContextProvider } from "@scandic-hotels/booking-flow/BookingFlowContextProvider"
|
||||
import { BookingFlowTrackingProvider } from "@scandic-hotels/booking-flow/BookingFlowTrackingProvider"
|
||||
|
||||
import { useIsUserLoggedIn } from "../hooks/useIsUserLoggedIn"
|
||||
import {
|
||||
trackAccordionItemOpen,
|
||||
trackBedSelection,
|
||||
trackBookingSearchClick,
|
||||
trackBreakfastSelection,
|
||||
trackGenericEvent,
|
||||
trackGlaSaveCardAttempt,
|
||||
trackLoginClick,
|
||||
trackOpenSidePeek,
|
||||
trackPaymentEvent,
|
||||
trackUpdatePaymentMethod,
|
||||
} from "../utils/tracking"
|
||||
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
@@ -24,22 +11,7 @@ export function BookingFlowProviders({ children }: { children: ReactNode }) {
|
||||
|
||||
return (
|
||||
<BookingFlowContextProvider data={{ isLoggedIn }}>
|
||||
<BookingFlowTrackingProvider
|
||||
trackingFunctions={{
|
||||
trackBookingSearchClick,
|
||||
trackAccordionItemOpen,
|
||||
trackOpenSidePeek,
|
||||
trackGenericEvent,
|
||||
trackGlaSaveCardAttempt,
|
||||
trackLoginClick,
|
||||
trackPaymentEvent,
|
||||
trackUpdatePaymentMethod,
|
||||
trackBreakfastSelection,
|
||||
trackBedSelection,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</BookingFlowTrackingProvider>
|
||||
{children}
|
||||
</BookingFlowContextProvider>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user