/** * 主应用入口 * * 页面结构: * - / → 先知主站(报纸风赛程 + 预测),报头含「评估」「管理」入口 * - /admin/* → 管理后台(鉴权门禁,未登录引导登录) * * 导航策略: * - 首页报头放「评估」「管理」入口(极简,不另加导航条) * - 管理后台由 AdminLayout 侧边栏处理所有管理页导航 * - 未登录访问管理 → AdminLayout 门禁 → 登录页(不静默失败) */ import { BrowserRouter, Routes, Route, Navigate, Link } from 'react-router-dom' import { ErrorBoundary } from './components/ErrorBoundary' import Matches from './pages/Matches' import Standings from './pages/Standings' import { adminRoutes } from './admin/routes' /** 报眉日期行 */ function dateLine(): string { return new Date().toLocaleDateString('zh-CN', { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long', }) } function StandingsLayout({ children }: { children: React.ReactNode }) { return (

先知

{dateLine()}
{children}
) } function HomePage() { return (
{/* ── 报头:粗线 + 居中刊名 + 日期与分区链接 ── */}

先知

{dateLine()}
) } export default function App() { return ( } /> } /> {adminRoutes.map(route => ( {route.children.map(child => ( ))} ))} } /> ) }