mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 11:31:59 +08:00
fix(sidebar): highlight active feature in nested route (#1929)
Co-authored-by: Pranay Prateek <pranay@signoz.io> Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
parent
742ceac32c
commit
f0e13784e5
@ -89,12 +89,14 @@ function SideNav(): JSX.Element {
|
||||
},
|
||||
];
|
||||
|
||||
const currentMenu = menus.find((menu) => pathname.startsWith(menu.to));
|
||||
|
||||
return (
|
||||
<Sider collapsible collapsed={collapsed} onCollapse={onCollapse} width={200}>
|
||||
<Menu
|
||||
theme="dark"
|
||||
defaultSelectedKeys={[ROUTES.APPLICATION]}
|
||||
selectedKeys={[pathname]}
|
||||
selectedKeys={currentMenu ? [currentMenu?.to] : []}
|
||||
mode="inline"
|
||||
>
|
||||
{menus.map(({ to, Icon, name, tags }) => (
|
||||
|
Loading…
x
Reference in New Issue
Block a user