import { makeStyles, tokens } from '@fluentui/react-components'; import { Home24Regular, Add24Regular, History24Regular, Info24Regular, DocumentSearch24Regular, PeopleSearch24Regular, ChevronDown24Regular, ChevronRight24Regular } from '@fluentui/react-icons'; import React from 'react'; import { Link, useLocation } from 'react-router-dom'; const useStyles = makeStyles({ sidebar: { padding: tokens.spacingVerticalM, }, menuItem: { display: 'flex', alignItems: 'center', padding: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalM, color: tokens.colorNeutralForeground1, textDecoration: 'none', borderRadius: tokens.borderRadiusMedium, gap: tokens.spacingHorizontalS, ':hover': { backgroundColor: tokens.colorNeutralBackground1Hover, }, }, activeMenuItem: { backgroundColor: tokens.colorNeutralBackground1Selected, color: tokens.colorBrandForeground1, ':hover': { backgroundColor: tokens.colorNeutralBackground1Selected, }, }, }); const menuItems = [ { path: '/', icon: Home24Regular, label: '主页' }, { path: '/create', icon: Add24Regular, label: '发布新帖' }, { path: '/progress', icon: History24Regular, label: '进度查询', subItems: [ { path: '/progress/review', icon: DocumentSearch24Regular, label: '投稿审核' }, { path: '/progress/complaint', icon: PeopleSearch24Regular, label: '投诉受理' } ] }, { path: '/about', icon: Info24Regular, label: '关于' }, ]; const Sidebar = () => { const [expandedItems, setExpandedItems] = React.useState>({}); const styles = useStyles(); const location = useLocation(); return ( ); }; export default Sidebar;