diff --git a/src/states/Manage/pages/Sidebar/Sidebar.jsx b/src/states/Manage/pages/Sidebar/Sidebar.jsx index 5c08b0c..3c51a88 100644 --- a/src/states/Manage/pages/Sidebar/Sidebar.jsx +++ b/src/states/Manage/pages/Sidebar/Sidebar.jsx @@ -25,10 +25,11 @@ export const Sidebar = ({open, setOpen}) => { {sidebar.map((page) => { const current = getPage(window.location.pathname); + if (page.route) return; + return ( - <div className={"sidebar-item" + (current.path === page.path ? " item-active" : "")} - key={page.name} - onClick={() => update(page.path)}> + <div className={"sidebar-item" + (current.route === page.path || current.path === page.path ? " item-active" : "")} + key={page.name} onClick={() => update(page.path)}> <FontAwesomeIcon icon={page.icon}/> <h1>{page.name}</h1> </div>