You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
680 B

import { Menu } from "antd";
import React, { useEffect } from "react";
import { Link, useLocation } from "react-router-dom";
/**
*
* @param {{activeItem: string}} activeItem
*/
export default function Sidebar() {
const location = useLocation();
return (
<Menu
defaultSelectedKeys={[location.pathname.split("/")[1] || "home"]}
mode="inline"
theme="dark"
>
<Menu.Item key="home">
<Link to="/">Home</Link>
</Menu.Item>
<Menu.Item key="clients">
<Link to="/clients">Clients</Link>
</Menu.Item>
<Menu.Item key="projects">
<Link to="/projects">Projects</Link>
</Menu.Item>
</Menu>
);
}