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) => {
|
{sidebar.map((page) => {
|
||||||
const current = getPage(window.location.pathname);
|
const current = getPage(window.location.pathname);
|
||||||
|
|
||||||
|
if (page.route) return;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"sidebar-item" + (current.path === page.path ? " item-active" : "")}
|
<div className={"sidebar-item" + (current.route === page.path || current.path === page.path ? " item-active" : "")}
|
||||||
key={page.name}
|
key={page.name} onClick={() => update(page.path)}>
|
||||||
onClick={() => update(page.path)}>
|
|
||||||
<FontAwesomeIcon icon={page.icon}/>
|
<FontAwesomeIcon icon={page.icon}/>
|
||||||
<h1>{page.name}</h1>
|
<h1>{page.name}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user