update docs
This commit is contained in:
parent
6f366bf648
commit
70bf30dd3b
Binary file not shown.
Binary file not shown.
BIN
public/images/google-docs.png
Normal file
BIN
public/images/google-docs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@ -1,6 +1,8 @@
|
|||||||
|
import { Metrika } from '@/components/metrika';
|
||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
import { Suspense } from 'react';
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
variable: "--font-geist-sans",
|
variable: "--font-geist-sans",
|
||||||
@ -35,6 +37,10 @@ export default function RootLayout({
|
|||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
|
<Suspense>
|
||||||
|
<Metrika />
|
||||||
|
</Suspense>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -74,6 +74,13 @@ export default function Home() {
|
|||||||
DOCX
|
DOCX
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
|
<Link href="https://docs.google.com/document/d/1lTTFHZ43FQdXHG_cvmHvi2hpSxAVLsI0iM7Xj9VvxAI/edit?usp=sharing" target="_blank">
|
||||||
|
<DropdownMenuItem>
|
||||||
|
<Image src="/images/google-docs.png" alt="google docx icon" height={16} width={16} className="grayscale"/>
|
||||||
|
Google Docs
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</Link>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
34
src/components/metrika.tsx
Normal file
34
src/components/metrika.tsx
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { usePathname, useSearchParams } from "next/navigation";
|
||||||
|
import Script from "next/script";
|
||||||
|
|
||||||
|
export function Metrika() {
|
||||||
|
const pathName = usePathname();
|
||||||
|
const searchParams = useSearchParams();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-expect-error
|
||||||
|
window.ym(100593564, "hit", window.location.href);
|
||||||
|
}, [pathName, searchParams]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Script id="yandex-metrika">
|
||||||
|
{`
|
||||||
|
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
|
||||||
|
m[i].l=1*new Date();
|
||||||
|
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
|
||||||
|
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
|
||||||
|
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
||||||
|
|
||||||
|
ym(100593564, "init", {
|
||||||
|
clickmap:true,
|
||||||
|
trackLinks:true,
|
||||||
|
accurateTrackBounce:true
|
||||||
|
})
|
||||||
|
`}
|
||||||
|
</Script>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user