2026-02-06 09:01:35 +07:00
|
|
|
import type { Metadata } from "next";
|
2026-02-09 05:46:54 +07:00
|
|
|
import { IBM_Plex_Sans, IBM_Plex_Mono } from "next/font/google";
|
2026-02-06 09:01:35 +07:00
|
|
|
import "./globals.css";
|
|
|
|
|
|
2026-02-09 05:46:54 +07:00
|
|
|
const ibmPlexSans = IBM_Plex_Sans({
|
2026-02-06 09:01:35 +07:00
|
|
|
subsets: ["latin"],
|
2026-02-09 05:46:54 +07:00
|
|
|
weight: ["400", "500", "600", "700"],
|
|
|
|
|
variable: "--font-ibm-plex-sans",
|
2026-02-08 10:33:24 +07:00
|
|
|
display: "swap",
|
2026-02-06 09:01:35 +07:00
|
|
|
});
|
|
|
|
|
|
2026-02-09 05:46:54 +07:00
|
|
|
const ibmPlexMono = IBM_Plex_Mono({
|
2026-02-06 09:01:35 +07:00
|
|
|
subsets: ["latin"],
|
2026-02-09 05:46:54 +07:00
|
|
|
weight: ["400", "700"],
|
|
|
|
|
variable: "--font-ibm-plex-mono",
|
2026-02-08 10:33:24 +07:00
|
|
|
display: "swap",
|
2026-02-06 09:01:35 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
2026-02-08 10:33:24 +07:00
|
|
|
title: "XAUBOT AI — Trading Monitor",
|
|
|
|
|
description: "Real-time monitoring dashboard for XAUBOT AI Trading Bot",
|
2026-02-06 09:01:35 +07:00
|
|
|
};
|
|
|
|
|
|
2026-02-09 05:46:54 +07:00
|
|
|
// Inline script to prevent flash of wrong theme
|
|
|
|
|
const themeScript = `
|
|
|
|
|
(function() {
|
|
|
|
|
try {
|
|
|
|
|
var t = localStorage.getItem('theme');
|
|
|
|
|
if (t === 'dark' || (!t && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
|
|
|
document.documentElement.classList.add('dark');
|
|
|
|
|
}
|
|
|
|
|
} catch(e) {}
|
|
|
|
|
})();
|
|
|
|
|
`;
|
|
|
|
|
|
2026-02-06 09:01:35 +07:00
|
|
|
export default function RootLayout({
|
|
|
|
|
children,
|
|
|
|
|
}: Readonly<{
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}>) {
|
|
|
|
|
return (
|
2026-02-09 05:46:54 +07:00
|
|
|
<html lang="en" suppressHydrationWarning>
|
|
|
|
|
<head>
|
|
|
|
|
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
|
|
|
|
|
</head>
|
2026-02-06 09:01:35 +07:00
|
|
|
<body
|
2026-02-09 05:46:54 +07:00
|
|
|
className={`${ibmPlexSans.variable} ${ibmPlexMono.variable} antialiased bg-background text-foreground`}
|
2026-02-06 09:01:35 +07:00
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|