From 0973103c0ee4eb6ed5fa7e54831444673fa7b744 Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Wed, 14 Feb 2024 11:44:22 +0100 Subject: [PATCH] chore: move type --- app/[lang]/Tracking.tsx | 10 +++++----- types/components/tracking.ts | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/[lang]/Tracking.tsx b/app/[lang]/Tracking.tsx index 741332b55..e4498b511 100644 --- a/app/[lang]/Tracking.tsx +++ b/app/[lang]/Tracking.tsx @@ -1,13 +1,13 @@ "use client" -import { TrackingData, TrackingProps } from "@/types/components/tracking" +import { + TrackingData, + TrackingProps, + WindowWithDataLayer, +} from "@/types/components/tracking" import { usePathname, useSearchParams } from "next/navigation" import { useEffect } from "react" -type WindowWithDataLayer = Window & { - datalayer: { [key: string]: any } -} - declare const window: WindowWithDataLayer function createPageObject(trackingData: TrackingData) { diff --git a/types/components/tracking.ts b/types/components/tracking.ts index 00afb55e3..e8436e38d 100644 --- a/types/components/tracking.ts +++ b/types/components/tracking.ts @@ -1,3 +1,7 @@ +export type WindowWithDataLayer = Window & { + datalayer: { [key: string]: any } +} + export type TrackingProps = { pageData: { pageId: string