upd
This commit is contained in:
@@ -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"] });
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user