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..d595450 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,8 +1,6 @@ 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"; const inter = Inter({ subsets: ["cyrillic", "latin"] }); @@ -19,15 +17,40 @@ export default function RootLayout({ return ( - - }> - -
{children}
+ ); 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; -}