e4de308ba4
静态导出下 !ready 原来渲染空白背景 div,慢网络首屏看着是空的。改为 !ready||!authed 一律渲染 Login(静态无会话默认态),SSG 首屏即登录表单。html 加 suppressHydrationWarning 消除主题 data-theme 的 hydration 警告(#418)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
29 lines
863 B
TypeScript
29 lines
863 B
TypeScript
import type { Metadata, Viewport } from 'next';
|
|
import './globals.css';
|
|
import { UIProvider } from '../lib/theme';
|
|
|
|
export const metadata: Metadata = {
|
|
title: '穿山甲 · 用户中心',
|
|
description: '管理订阅、兑换激活码、查看用量、邀请返利与账户安全设置。',
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: 'device-width',
|
|
initialScale: 1,
|
|
};
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="zh" data-theme="light" suppressHydrationWarning>
|
|
<head>
|
|
{/* 设计令牌单一真相源,原样链入(SRI 由构建期注入) */}
|
|
{/* eslint-disable-next-line @next/next/no-css-tags */}
|
|
<link rel="stylesheet" href="/colors_and_type.css" />
|
|
</head>
|
|
<body>
|
|
<UIProvider>{children}</UIProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|