import { Outlet, Link, useHref, NavLink } from 'react-router-dom'; import { Layout, Menu, ConfigProvider, theme, Empty, Row, Col, Dropdown, Space, Typography, App as AntApp } from 'antd'; import { DownOutlined } from '@ant-design/icons'; import ErrorBoundary from '@/components/ErrorBoundary'; import zhLocale from 'antd/locale/zh_CN'; import { useThemeContext } from '@/stores/ThemeContext'; import { useAuthContext } from '@/stores/AuthContext' import 'dayjs/locale/zh-cn'; import 'react-chat-elements/dist/main.css' import '@/assets/App.css'; import AppLogo from '@/assets/logo-gh.png'; import { isEmpty } from '@/utils/commons'; const { Header, Footer, Content } = Layout const { Title } = Typography // SecurityApp function App() { const { colorPrimary, borderRadius } = useThemeContext() const { loginUser, permissionList } = useAuthContext() const href = useHref() // 除了路由 /p...以外都需要登陆系统 const shouldBeLogin = isEmpty(loginUser) && (href.indexOf('/p/') == -1) let defaultPath = 'follow' if (href !== '/') { const splitPath = href.split('/') defaultPath = href } const { token: { colorBgContainer }, } = theme.useToken() return ( } >
App logo 聊天式销售平台 订单跟踪 }, { key: '/order/chat', label: 销售聊天 }, { key: '/chat/history', label: 聊天历史 }, { key: '/sales/management', label: 销售管理 } ]} /> 个人资料, key: '1', }, { type: 'divider', }, { label: 退出, key: '3', }, ] }} trigger={['click']} > e.preventDefault()} style={{ color: colorPrimary }}> 廖一军
) } export default App