From b61cb76cc300c20011cec832a7f6fb728a417db7 Mon Sep 17 00:00:00 2001 From: inmake Date: Mon, 1 Apr 2024 14:17:44 +0500 Subject: [PATCH 1/2] upd --- next.config.mjs | 1 + src/app/layout.tsx | 42 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 9f99cf3..3182a51 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: "export", trailingSlash: true, distDir: "dist", }; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index b2412d3..08dfc65 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,6 +4,7 @@ import { Suspense } from "react"; import { Inter } from "next/font/google"; import YandexMetrika from "@components/YandexMetrika"; import "./globals.css"; +import Head from "next/head"; const inter = Inter({ subsets: ["cyrillic", "latin"] }); @@ -19,15 +20,40 @@ export default function RootLayout({ return ( - - }> - -
{children}
+ ); From efedd1d940afdd3f395bdd830054773e84c834e8 Mon Sep 17 00:00:00 2001 From: inmake Date: Mon, 1 Apr 2024 14:18:26 +0500 Subject: [PATCH 2/2] upd --- src/app/layout.tsx | 3 --- src/components/YandexMetrika.tsx | 16 ---------------- 2 files changed, 19 deletions(-) delete mode 100644 src/components/YandexMetrika.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 08dfc65..d595450 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,10 +1,7 @@ import type { Metadata } from "next"; import Script from "next/script"; -import { Suspense } from "react"; import { Inter } from "next/font/google"; -import YandexMetrika from "@components/YandexMetrika"; import "./globals.css"; -import Head from "next/head"; const inter = Inter({ subsets: ["cyrillic", "latin"] }); diff --git a/src/components/YandexMetrika.tsx b/src/components/YandexMetrika.tsx deleted file mode 100644 index 49b22cd..0000000 --- a/src/components/YandexMetrika.tsx +++ /dev/null @@ -1,16 +0,0 @@ -"use client"; - -import { useEffect } from "react"; -import { usePathname, useSearchParams } from "next/navigation"; - -export default function YandexMetrika() { - const pathname = usePathname(); - const searchParams = useSearchParams(); - - useEffect(() => { - const url = `${pathname}?${searchParams}`; - ym(93606080, "hit", url); - }, [pathname, searchParams]); - - return null; -}