167 lines
6.1 KiB
TypeScript
167 lines
6.1 KiB
TypeScript
import React from "react";
|
||
import type { Metadata } from "next";
|
||
import { Geist, Geist_Mono } from "next/font/google";
|
||
import "./globals.css";
|
||
import { NextIntlClientProvider } from "next-intl";
|
||
import { getMessages } from "next-intl/server";
|
||
import { InitialLoading } from "@/components/initialLoading/initialLoading";
|
||
import { Providers } from "@/components/provider";
|
||
import Script from "next/script";
|
||
|
||
const geistSans = Geist({
|
||
variable: "--font-geist-sans",
|
||
subsets: ["latin"],
|
||
});
|
||
|
||
const geistMono = Geist_Mono({
|
||
variable: "--font-geist-mono",
|
||
subsets: ["latin"],
|
||
});
|
||
|
||
// openGraphData tipini aniq belgilaymiz
|
||
const openGraphData: Record<
|
||
"uz" | "ru" | "en",
|
||
{ title: string; description: string; locale: string }
|
||
> = {
|
||
uz: {
|
||
title: "Ignum Technologies - Professional Fire Safety Systems",
|
||
description:
|
||
"Tijorat va uy-joy ob’ektlari uchun yong‘in aniqlash, bostirish va signalizatsiya tizimlarini o‘z ichiga olgan to‘liq yong‘in himoyasi yechimlari.",
|
||
locale: "uz_UZ",
|
||
},
|
||
ru: {
|
||
title:
|
||
"Ignum Technologies - Профессиональные системы пожарной безопасности",
|
||
description:
|
||
"Полные решения по пожарной защите, включая системы обнаружения, тушения и сигнализации для коммерческих и жилых объектов.",
|
||
locale: "ru_RU",
|
||
},
|
||
en: {
|
||
title: "Ignum Technologies - Professional Fire Safety Systems",
|
||
description:
|
||
"Comprehensive fire protection solutions including detection, suppression, and alarm systems for commercial and residential properties.",
|
||
locale: "en_US",
|
||
},
|
||
};
|
||
|
||
export const metadata: Metadata = {
|
||
title: {
|
||
default: "Ignum Technologies - Fire Safety Systems Installation & Sales",
|
||
template: "%s | Ignum Technologies",
|
||
},
|
||
description:
|
||
"Ignum Technologies specializes in professional fire safety systems installation and sales. Protect your property with cutting-edge fire detection, suppression, and alarm systems from certified experts.",
|
||
keywords: [
|
||
"fire safety systems",
|
||
"fire alarm installation",
|
||
"fire suppression systems",
|
||
"fire detection",
|
||
"Ignum Technologies",
|
||
"fire safety equipment",
|
||
"fire protection services",
|
||
"commercial fire systems",
|
||
"residential fire safety",
|
||
],
|
||
authors: [{ name: "Ignum Technologies" }],
|
||
creator: "Ignum Technologies",
|
||
publisher: "Ignum Technologies",
|
||
formatDetection: { email: false, address: false, telephone: false },
|
||
metadataBase: new URL("https://ignum-tech.com"),
|
||
alternates: { canonical: "/" },
|
||
icons: {
|
||
icon: [
|
||
{ url: "/icon-light-32x32.png", media: "(prefers-color-scheme: light)" },
|
||
{ url: "/icon-dark-32x32.png", media: "(prefers-color-scheme: dark)" },
|
||
{ url: "/icon.svg", type: "image/svg+xml" },
|
||
],
|
||
apple: "/apple-icon.png",
|
||
},
|
||
verification: { google: "your-google-verification-code" },
|
||
};
|
||
|
||
export default async function RootLayout({
|
||
children,
|
||
params,
|
||
}: Readonly<{ children: React.ReactNode; params: any }>) {
|
||
const { locale } = await params;
|
||
const messages: any = await getMessages();
|
||
|
||
// Locale ga mos Open Graph ma'lumotini tanlaymiz
|
||
const og = openGraphData[locale as "uz" | "ru" | "en"] || openGraphData["uz"];
|
||
|
||
return (
|
||
<html lang={locale} suppressHydrationWarning>
|
||
<head>
|
||
<link rel="manifest" href="/manifest.json" />
|
||
<meta name="theme-color" content="#FF4500" />
|
||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||
<meta name="apple-mobile-web-app-title" content="Ignum Tech" />
|
||
|
||
{/* Open Graph */}
|
||
<meta property="og:type" content="website" />
|
||
<meta property="og:locale" content={og.locale} />
|
||
<meta property="og:url" content="https://ignum-tech.com" />
|
||
<meta property="og:site_name" content="Ignum Technologies" />
|
||
<meta property="og:title" content={og.title} />
|
||
<meta property="og:description" content={og.description} />
|
||
<meta property="og:image" content="/og-image.jpg" />
|
||
<meta property="og:image:width" content="1200" />
|
||
<meta property="og:image:height" content="630" />
|
||
<meta
|
||
property="og:image:alt"
|
||
content="Ignum Technologies - Fire Safety Systems"
|
||
/>
|
||
|
||
{/* Twitter */}
|
||
<meta name="twitter:card" content="summary_large_image" />
|
||
<meta name="twitter:title" content={og.title} />
|
||
<meta name="twitter:description" content={og.description} />
|
||
<meta name="twitter:image" content="/twitter-image.jpg" />
|
||
<meta name="twitter:creator" content="@ignumtech" />
|
||
|
||
{/* Yandex Metrika */}
|
||
<Script
|
||
id="yandex-metrika"
|
||
strategy="afterInteractive"
|
||
dangerouslySetInnerHTML={{
|
||
__html: `
|
||
(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(106736850, "init", {
|
||
clickmap:true,
|
||
trackLinks:true,
|
||
accurateTrackBounce:true,
|
||
webvisor:true,
|
||
ecommerce:"dataLayer"
|
||
});
|
||
`,
|
||
}}
|
||
/>
|
||
<noscript>
|
||
<div>
|
||
<img
|
||
src="https://mc.yandex.ru/watch/106736850"
|
||
style={{ position: "absolute", left: "-9999px" }}
|
||
alt=""
|
||
/>
|
||
</div>
|
||
</noscript>
|
||
</head>
|
||
<body
|
||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||
>
|
||
{/* <InitialLoading />
|
||
<NextIntlClientProvider messages={messages} locale={locale}>
|
||
<Providers>{children}</Providers>
|
||
</NextIntlClientProvider> */}
|
||
{children}
|
||
</body>
|
||
</html>
|
||
);
|
||
}
|