Feat/enter details tracking * feat: fixed bug in enter details tracking * Sidepeek events, lowestroomPrice and analyticsRateCode * Cleanup and fixed bug * Fixed analyticsratecode * Merge master * merge master * Removed console logs * Added ancillaries tracking to enter details * Added ancillary on confirmation page * Removed console log * Merge branch 'master' into feat/enter-details-tracking * Refactor searchparams * Hard code values for breakfast ancillary Approved-by: Joakim Jäderberg
35 lines
751 B
TypeScript
35 lines
751 B
TypeScript
import { getUserTracking } from "@/lib/trpc/memoizedRequests"
|
|
|
|
import RouterTransition from "@/components/TrackingSDK/RouterTransition"
|
|
|
|
import type {
|
|
TrackingSDKHotelInfo,
|
|
TrackingSDKPageData,
|
|
TrackingSDKPaymentInfo,
|
|
} from "@/types/components/tracking"
|
|
|
|
export const preloadUserTracking = () => {
|
|
void getUserTracking()
|
|
}
|
|
|
|
export default async function TrackingSDK({
|
|
pageData,
|
|
hotelInfo,
|
|
paymentInfo,
|
|
}: {
|
|
pageData: TrackingSDKPageData
|
|
hotelInfo?: TrackingSDKHotelInfo
|
|
paymentInfo?: TrackingSDKPaymentInfo
|
|
}) {
|
|
const userTrackingData = await getUserTracking()
|
|
|
|
return (
|
|
<RouterTransition
|
|
pageData={pageData}
|
|
userData={userTrackingData}
|
|
hotelInfo={hotelInfo}
|
|
paymentInfo={paymentInfo}
|
|
/>
|
|
)
|
|
}
|