import { useLocation, useNavigate } from 'react-router-dom' import { Layout, Menu } from 'antd' import { AppstoreOutlined, MessageOutlined, HistoryOutlined, TeamOutlined, FileTextOutlined, BarChartOutlined, SettingOutlined, } from '@ant-design/icons' const { Sider } = Layout const menuItems = [ { key: '/agent/dashboard', icon: , label: '工作台' }, { key: '/agent/chat-history', icon: , label: '对话记录' }, { key: '/agent/customers', icon: , label: '客户管理' }, { key: '/agent/knowledge', icon: , label: '知识库' }, { key: '/agent/statistics', icon: , label: '数据统计' }, { key: '/agent/settings', icon: , label: '系统设置' }, ] const AgentSidebar = () => { const location = useLocation() const navigate = useNavigate() const selectedKey = menuItems.find(item => location.pathname.startsWith(item.key))?.key || '/agent/dashboard' return (
客服云
navigate(key)} className="border-e-0 mt-2" /> ) } export default AgentSidebar