Files
lotteryAdmin/src/app/layout.tsx
kang 17335cb47a feat(docs, integration): update integration documentation and redirect legacy paths
Introduced a new public documentation site for client integration at `/docs` and `/docs/integration`, removing the need for admin login. Updated the integration guide to redirect from the old admin path to the new documentation site. Added localization support for the integration documentation in English, Nepali, and Chinese. Enhanced the layout structure and improved the handling of currency display in settlement bills.
2026-06-15 11:08:19 +08:00

50 lines
1.3 KiB
TypeScript

import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { Providers } from "@/components/providers";
import "./globals.css";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: {
template: "%s · Lottery Admin",
default: "Lottery Admin",
},
description: "Lottery administration console",
};
/** 在 React 水合前恢复 `<html lang>`,避免刷新后先闪中文再切换 */
const ADMIN_LOCALE_BOOTSTRAP = `(function(){try{var s=localStorage.getItem("lottery_admin_ui_locale");var m={zh:"zh-Hans",en:"en",ne:"ne"};if(s&&m[s])document.documentElement.lang=m[s];}catch(e){}})();`;
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html
lang="zh-Hans"
suppressHydrationWarning
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<head>
<script
dangerouslySetInnerHTML={{ __html: ADMIN_LOCALE_BOOTSTRAP }}
/>
</head>
<body className="flex min-h-full flex-col">
<Providers>{children}</Providers>
</body>
</html>
);
}