refactor(web): Dashboard 页面统一改为 CSR 模式

将所有 dashboard 路由组页面改为客户端组件,避免 zustand persist 导致的 hydration mismatch 问题。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
charilezhou
2026-01-17 14:07:13 +08:00
parent e66518f18f
commit 8c35fac857
4 changed files with 4 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
import type { Metadata } from 'next';
'use client';
import {
DashboardStats,
@@ -6,10 +6,6 @@ import {
RecentActivity,
} from '@/components/dashboard';
export const metadata: Metadata = {
title: '仪表盘',
};
export default function DashboardPage() {
return (
<div className="space-y-6">

View File

@@ -1,4 +1,4 @@
import type { Metadata } from 'next';
'use client';
import { PasswordForm } from '@/components/forms/PasswordForm';
import { ProfileForm } from '@/components/forms/ProfileForm';
@@ -10,10 +10,6 @@ import {
CardTitle,
} from '@/components/ui/card';
export const metadata: Metadata = {
title: '个人中心',
};
export default function ProfilePage() {
return (
<div className="space-y-6">

View File

@@ -1,11 +1,7 @@
import type { Metadata } from 'next';
'use client';
import { ThemeSettings, SidebarSettings } from '@/components/settings';
export const metadata: Metadata = {
title: '系统设置',
};
export default function SettingsPage() {
return (
<div className="space-y-6">

View File

@@ -1,4 +1,4 @@
import type { Metadata } from 'next';
'use client';
import {
Card,
@@ -9,10 +9,6 @@ import {
} from '@/components/ui/card';
import { UsersTable } from '@/components/users/UsersTable';
export const metadata: Metadata = {
title: '用户管理',
};
export default function UsersPage() {
return (
<div className="space-y-6">