Capital/app/layout.tsx

55 lines
1.4 KiB
TypeScript
Raw Permalink Normal View History

2024-02-24 06:16:57 +00:00
import type { Metadata } from "next";
import { ReactNode } from "react";
import { ThemeProvider } from "@mui/material/styles";
import { AppRouterCacheProvider } from "@mui/material-nextjs/v13-appRouter";
import { CssBaseline } from "@mui/material";
2024-02-24 10:54:47 +00:00
import { SITE_DESCRIPTION, SITE_NAME } from "@/app/consts";
2024-02-24 06:16:57 +00:00
import { theme } from "@/app/theme";
import { SpeedInsights } from "@vercel/speed-insights/next";
2024-02-24 06:16:57 +00:00
import "@fontsource/roboto/300.css";
import "@fontsource/roboto/400.css";
import "@fontsource/roboto/500.css";
import "@fontsource/roboto/700.css";
import "./globals.css";
import AppShell from "@/components/AppShell";
2024-02-24 13:56:35 +00:00
import NextTopLoader from "nextjs-toploader";
2024-02-24 06:16:57 +00:00
2024-02-24 11:01:25 +00:00
export const runtime = "edge";
2024-02-24 06:16:57 +00:00
export const metadata: Metadata = {
2024-02-24 10:54:47 +00:00
title: {
default: SITE_NAME,
template: `${SITE_NAME} | %s`
},
2024-02-24 11:01:25 +00:00
description: SITE_DESCRIPTION
2024-02-24 06:16:57 +00:00
};
export default function RootLayout({ children }: Readonly<{
children: ReactNode;
}>) {
return (
2024-02-24 10:54:47 +00:00
<html lang="zh-CN">
2024-02-24 06:16:57 +00:00
<body>
<AppRouterCacheProvider>
<CssBaseline />
<SpeedInsights />
2024-02-24 16:07:11 +00:00
<NextTopLoader color="#ffffff" showSpinner={false} />
2024-02-24 06:16:57 +00:00
<ThemeProvider theme={theme}>
<AppShell>{children}</AppShell>
</ThemeProvider>
</AppRouterCacheProvider>
<script
async
src="https://analytics.smartsheep.studio/script.js"
data-website-id="bbe87bab-bd5b-416b-8767-b29088c75ab2"
/>
2024-02-24 06:16:57 +00:00
</body>
</html>
);
}