Created the Sidebar.jsx
This commit is contained in:
parent
21191d0b56
commit
f2c0754203
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user