20 lines
561 B
TypeScript
20 lines
561 B
TypeScript
import { Menu } from 'antd';
|
|
import { useNavigate, useLocation } from 'react-router-dom';
|
|
import { getSidebarMenuItems } from '../../constants/navigation';
|
|
|
|
const Sidebar = () => {
|
|
const navigate = useNavigate();
|
|
const location = useLocation();
|
|
|
|
return (
|
|
<Menu
|
|
mode="inline"
|
|
selectedKeys={[location.pathname]}
|
|
items={getSidebarMenuItems()}
|
|
onClick={({ key }) => navigate(key)}
|
|
style={{ height: '100%', borderInlineEnd: 0, paddingTop: 12, background: '#ffffff', color: '#000000' }}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default Sidebar;
|