The previous commit used http:// for the Umami script. Any browser loading the dashboard over HTTPS would silently drop the HTTP request as mixed content, so the tracker would never fire in production. Switch to https:// — the SSLip.io subdomain is already served over TLS.
92 lines
2.5 KiB
TypeScript
92 lines
2.5 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import Script from "next/script";
|
|
import "./globals.css";
|
|
import { AuthProvider } from "@/hooks/use-auth";
|
|
import { ThemeProvider } from "@/hooks/use-theme";
|
|
import { PwaRegister } from "@/components/pwa-register";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "MEGA INFRASTRUCTURE · Operations",
|
|
description:
|
|
"Construction site operations dashboard — fuel tracking, order management, and workforce hours for MEGA INFRASTRUCTURE.",
|
|
applicationName: "MEGA INFRASTRUCTURE",
|
|
authors: [{ name: "MEGA INFRASTRUCTURE" }],
|
|
generator: "Next.js",
|
|
keywords: [
|
|
"construction",
|
|
"operations",
|
|
"fuel tracking",
|
|
"workforce",
|
|
"orders",
|
|
"site management",
|
|
],
|
|
// Open Graph — used by WhatsApp, Facebook, LinkedIn, Discord, etc.
|
|
openGraph: {
|
|
type: "website",
|
|
siteName: "MEGA INFRASTRUCTURE",
|
|
title: "MEGA INFRASTRUCTURE · Operations",
|
|
description:
|
|
"Site operations dashboard — fuel tracking, order management, and workforce hours.",
|
|
images: [
|
|
{
|
|
url: "/og-image.png",
|
|
width: 1200,
|
|
height: 630,
|
|
alt: "MEGA INFRASTRUCTURE — Site operations dashboard",
|
|
},
|
|
],
|
|
locale: "en_ZA",
|
|
},
|
|
// Twitter / X card
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "MEGA INFRASTRUCTURE · Operations",
|
|
description:
|
|
"Site operations dashboard — fuel tracking, order management, and workforce hours.",
|
|
images: ["/og-image.png"],
|
|
},
|
|
appleWebApp: {
|
|
capable: true,
|
|
title: "MEGA OPS",
|
|
statusBarStyle: "default",
|
|
},
|
|
formatDetection: {
|
|
telephone: false,
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#e8ebed" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#1c2433" },
|
|
],
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{ children: React.ReactNode }>) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head>
|
|
<link rel="manifest" href="/manifest.json" />
|
|
<meta name="theme-color" content="#fdb13c" />
|
|
<Script
|
|
src="https://umami-vmyngbmelll45wokwr270wbx.169.239.180.130.sslip.io/script.js"
|
|
data-website-id="7655a10d-78f7-4391-a0b5-1f8449d4598a"
|
|
strategy="afterInteractive"
|
|
/>
|
|
</head>
|
|
<body>
|
|
<ThemeProvider>
|
|
<AuthProvider>
|
|
<PwaRegister />
|
|
{children}
|
|
</AuthProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|