Fixed type imports

This commit is contained in:
Linus Flood
2024-12-13 09:48:53 +01:00
parent 6f1d5129e9
commit 5f8a13d478
7 changed files with 20 additions and 25 deletions

View File

@@ -9,8 +9,8 @@ import { setLang } from "@/i18n/serverContext"
import { import {
TrackingChannelEnum, TrackingChannelEnum,
TrackingSDKHotelInfo, type TrackingSDKHotelInfo,
TrackingSDKPageData, type TrackingSDKPageData,
} from "@/types/components/tracking" } from "@/types/components/tracking"
import { CurrencyEnum } from "@/types/enums/currency" import { CurrencyEnum } from "@/types/enums/currency"
import type { LangParams, PageArgs } from "@/types/params" import type { LangParams, PageArgs } from "@/types/params"

View File

@@ -1,6 +1,5 @@
import { Suspense } from "react" import { Suspense } from "react"
import { Lang } from "@/constants/languages"
import { env } from "@/env/server" import { env } from "@/env/server"
import TrackingSDK from "@/components/TrackingSDK" import TrackingSDK from "@/components/TrackingSDK"
@@ -10,7 +9,7 @@ import styles from "./page.module.css"
import { import {
TrackingChannelEnum, TrackingChannelEnum,
TrackingSDKPageData, type TrackingSDKPageData,
} from "@/types/components/tracking" } from "@/types/components/tracking"
import type { LangParams, PageArgs } from "@/types/params" import type { LangParams, PageArgs } from "@/types/params"
@@ -23,7 +22,7 @@ export default function HotelReservationPage({ params }: PageArgs<LangParams>) {
const pageTrackingData: TrackingSDKPageData = { const pageTrackingData: TrackingSDKPageData = {
pageId: "hotelreservation", pageId: "hotelreservation",
domainLanguage: params.lang as Lang, domainLanguage: params.lang,
channel: TrackingChannelEnum["hotelreservation"], channel: TrackingChannelEnum["hotelreservation"],
pageName: "hotelreservation", pageName: "hotelreservation",
siteSections: "hotelreservation", siteSections: "hotelreservation",

View File

@@ -2,7 +2,6 @@ import { differenceInCalendarDays, format, isWeekend } from "date-fns"
import { notFound } from "next/navigation" import { notFound } from "next/navigation"
import { Suspense } from "react" import { Suspense } from "react"
import { Lang } from "@/constants/languages"
import { getHotelData, getLocations } from "@/lib/trpc/memoizedRequests" import { getHotelData, getLocations } from "@/lib/trpc/memoizedRequests"
import HotelInfoCard from "@/components/HotelReservation/SelectRate/HotelInfoCard" import HotelInfoCard from "@/components/HotelReservation/SelectRate/HotelInfoCard"
@@ -19,8 +18,8 @@ import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
import type { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate" import type { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate"
import { import {
TrackingChannelEnum, TrackingChannelEnum,
TrackingSDKHotelInfo, type TrackingSDKHotelInfo,
TrackingSDKPageData, type TrackingSDKPageData,
} from "@/types/components/tracking" } from "@/types/components/tracking"
import type { LangParams, PageArgs } from "@/types/params" import type { LangParams, PageArgs } from "@/types/params"
@@ -72,7 +71,7 @@ export default async function SelectRatePage({
const pageTrackingData: TrackingSDKPageData = { const pageTrackingData: TrackingSDKPageData = {
pageId: "select-rate", pageId: "select-rate",
domainLanguage: params.lang as Lang, domainLanguage: params.lang,
channel: TrackingChannelEnum["hotelreservation"], channel: TrackingChannelEnum["hotelreservation"],
pageName: "hotelreservation|select-rate", pageName: "hotelreservation|select-rate",
siteSections: "hotelreservation|select-rate", siteSections: "hotelreservation|select-rate",

View File

@@ -1,12 +1,8 @@
"use client" "use client"
import { usePathname } from "next/navigation" import { usePathname } from "next/navigation"
import { useEffect, useMemo, useRef } from "react" import { useEffect, useMemo, useRef } from "react"
import { Lang } from "@/constants/languages"
import { RoomConfiguration } from "@/server/routers/hotels/output"
import { useEnterDetailsStore } from "@/stores/enter-details" import { useEnterDetailsStore } from "@/stores/enter-details"
import useTrackingStore from "@/stores/tracking"
import { useSessionId } from "@/hooks/useSessionId" import { useSessionId } from "@/hooks/useSessionId"
import { createSDKPageObject } from "@/utils/tracking" import { createSDKPageObject } from "@/utils/tracking"
@@ -14,11 +10,13 @@ import { createSDKPageObject } from "@/utils/tracking"
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter" import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
import { import {
TrackingChannelEnum, TrackingChannelEnum,
TrackingSDKHotelInfo, type TrackingSDKHotelInfo,
TrackingSDKPageData, type TrackingSDKPageData,
TrackingSDKUserData, type TrackingSDKUserData,
} from "@/types/components/tracking" } from "@/types/components/tracking"
import { Packages } from "@/types/requests/packages" import type { Packages } from "@/types/requests/packages"
import type { Lang } from "@/constants/languages"
import type { RoomConfiguration } from "@/server/routers/hotels/output"
type Props = { type Props = {
initialHotelsTrackingData: TrackingSDKHotelInfo initialHotelsTrackingData: TrackingSDKHotelInfo

View File

@@ -38,8 +38,8 @@ import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
import type { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate" import type { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate"
import { import {
TrackingChannelEnum, TrackingChannelEnum,
TrackingSDKHotelInfo, type TrackingSDKHotelInfo,
TrackingSDKPageData, type TrackingSDKPageData,
} from "@/types/components/tracking" } from "@/types/components/tracking"
import { StepEnum } from "@/types/enums/step" import { StepEnum } from "@/types/enums/step"
import type { LangParams, PageArgs } from "@/types/params" import type { LangParams, PageArgs } from "@/types/params"

View File

@@ -22,8 +22,8 @@ import type {
import type { SelectHotelMapContainerProps } from "@/types/components/hotelReservation/selectHotel/map" import type { SelectHotelMapContainerProps } from "@/types/components/hotelReservation/selectHotel/map"
import { import {
TrackingChannelEnum, TrackingChannelEnum,
TrackingSDKHotelInfo, type TrackingSDKHotelInfo,
TrackingSDKPageData, type TrackingSDKPageData,
} from "@/types/components/tracking" } from "@/types/components/tracking"
import type { Lang } from "@/constants/languages" import type { Lang } from "@/constants/languages"

View File

@@ -34,11 +34,10 @@ import type { HotelData } from "@/types/components/hotelReservation/selectHotel/
import type { SelectHotelProps } from "@/types/components/hotelReservation/selectHotel/selectHotel" import type { SelectHotelProps } from "@/types/components/hotelReservation/selectHotel/selectHotel"
import { import {
TrackingChannelEnum, TrackingChannelEnum,
TrackingSDKHotelInfo, type TrackingSDKHotelInfo,
TrackingSDKPageData, type TrackingSDKPageData,
} from "@/types/components/tracking" } from "@/types/components/tracking"
import { AlertTypeEnum } from "@/types/enums/alert" import { AlertTypeEnum } from "@/types/enums/alert"
import type { Lang } from "@/constants/languages"
export default async function SelectHotel({ export default async function SelectHotel({
city, city,
@@ -103,7 +102,7 @@ export default async function SelectHotel({
const pageTrackingData: TrackingSDKPageData = { const pageTrackingData: TrackingSDKPageData = {
pageId: "select-hotel", pageId: "select-hotel",
domainLanguage: params.lang as Lang, domainLanguage: params.lang,
channel: TrackingChannelEnum["hotelreservation"], channel: TrackingChannelEnum["hotelreservation"],
pageName: "hotelreservation|select-hotel", pageName: "hotelreservation|select-hotel",
siteSections: "hotelreservation|select-hotel", siteSections: "hotelreservation|select-hotel",