Files
vf_react/src/views/Center/Center.tsx
zdl dafef2c572 refactor(Center): 大幅简化,移除侧边栏逻辑
- 移除 WatchSidebar 相关代码(已移至全局 GlobalSidebar)
- 移除数据加载逻辑(由 GlobalSidebarContext 统一管理)
- 移除 useAuth、useLocation、useNavigate 等依赖
- 保留核心功能:MarketDashboard、ForumCenter、InvestmentPlanningCenter
- 代码从 ~260 行精简至 ~40 行

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-23 11:56:30 +08:00

46 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Center - 个人中心仪表板主页面
*
* 对应路由:/home/center
* 功能:自选股监控、关注事件、投资规划等
*/
import React from 'react';
import { Box } from '@chakra-ui/react';
import InvestmentPlanningCenter from './components/InvestmentPlanningCenter';
import MarketDashboard from '@views/Profile/components/MarketDashboard';
import ForumCenter from '@views/Profile/components/ForumCenter';
import { THEME } from '@views/Profile/components/MarketDashboard/constants';
/**
* CenterDashboard 组件
* 个人中心仪表板主页面
*
* 注意:右侧 WatchSidebar 已移至全局 GlobalSidebar在 MainLayout 中渲染)
*/
const CenterDashboard: React.FC = () => {
return (
<Box bg={THEME.bg.primary} minH="100vh" overflowX="hidden">
<Box px={{ base: 3, md: 4 }} py={{ base: 4, md: 6 }} maxW="container.xl" mx="auto">
{/* 市场概览仪表盘 */}
<Box mb={4}>
<MarketDashboard />
</Box>
{/* 价值论坛 / 互动中心 */}
<Box mb={4}>
<ForumCenter />
</Box>
{/* 投资规划中心(整合了日历、计划、复盘,应用 FUI 毛玻璃风格) */}
<Box>
<InvestmentPlanningCenter />
</Box>
</Box>
</Box>
);
};
export default CenterDashboard;