e319481976
- 统一调整 admin.ts 文件中的接口定义缩进格式 - 优化 animated-theme-toggler.tsx 组件的代码结构和缩进 - 规范 app-config-modal.tsx 中 JSX 元素的嵌套格式 - 整理 app-providers.tsx 中的组件层级缩进 - 标准化 app-theme.ts 中的对象属性缩进格式
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import type { Metadata } from "next";
|
|
import Script from "next/script";
|
|
import { AntdRegistry } from "@ant-design/nextjs-registry";
|
|
import { AppProviders } from "@/components/layout/app-providers";
|
|
import "antd/dist/reset.css";
|
|
import "./globals.css";
|
|
import React from "react";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "无限画布",
|
|
description: "一个无限画布创作工具",
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="zh-CN" suppressHydrationWarning className="font-sans">
|
|
<body
|
|
className="bg-background text-foreground antialiased"
|
|
style={{
|
|
fontFamily: '"SF Pro Display","SF Pro Text","PingFang SC","Microsoft YaHei","Helvetica Neue",sans-serif',
|
|
}}
|
|
>
|
|
<Script
|
|
id="theme-script"
|
|
strategy="beforeInteractive"
|
|
dangerouslySetInnerHTML={{
|
|
__html: `try{var s=JSON.parse(localStorage.getItem("infinite-canvas:theme_store")||"{}");var t=s.state&&s.state.theme==="light"?"light":"dark";document.documentElement.classList.toggle("dark",t==="dark");document.documentElement.style.colorScheme=t}catch(e){}`,
|
|
}}
|
|
/>
|
|
<AntdRegistry>
|
|
<AppProviders>{children}</AppProviders>
|
|
</AntdRegistry>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|