import React, { useState } from 'react'; import { Outlet, NavLink, useNavigate } from 'react-router-dom'; import { useAuth } from '@/contexts/AuthContext'; import './FrontLayout.css'; const navItems = [ { path: '/chat', icon: 'chat', label: 'AI聊天' }, { path: '/channels', icon: 'channel', label: 'IM Bot' }, { path: '/knowledge', icon: 'knowledge', label: '知识库' }, { path: '/market', icon: 'market', label: '技能市场' }, { path: '/token', icon: 'token', label: 'Token驾驶舱' }, { path: '/pricing', icon: 'pricing', label: '付费中心' }, { path: '/assets', icon: 'assets', label: '资产文件' }, { path: '/evolution', icon: 'evolution', label: 'AI自进化' }, { path: '/wechat-bot', icon: 'wechat', label: '微信机器人' }, ]; const bottomItems = [ { path: '/profile', icon: 'profile', label: '个人中心' }, { path: '/notifications', icon: 'notify', label: '消息通知' }, ]; const iconPaths: Record = { chat: , channel: , knowledge: , market: , apps: , token: , pricing: , profile: , notify: , assets: , evolution: , wechat: , }; const FrontLayout: React.FC = () => { const { user, logout } = useAuth(); const navigate = useNavigate(); const [collapsed, setCollapsed] = useState(false); if (!user) { navigate('/login'); return null; } return (
{/* Sidebar */} {/* Main Content */}
); }; export default FrontLayout;