mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-02 06:02:19 +00:00
0.0.22
- Rework navbar + user pages
This commit is contained in:
parent
fb9ebef49c
commit
3f3296e649
17 changed files with 132 additions and 73 deletions
|
@ -12,8 +12,9 @@ const menuItems = [
|
|||
];
|
||||
|
||||
const loggedInMenuItems = [
|
||||
'Dashboard',
|
||||
'Docs',
|
||||
'Home',
|
||||
'My Profile',
|
||||
// 'Docs',
|
||||
]
|
||||
|
||||
const isMobile = () => {
|
||||
|
@ -50,8 +51,7 @@ const Navigation = () => {
|
|||
key={menuItem}
|
||||
className="navLinkMobile"
|
||||
style={active === menuItem.toLowerCase() ? activeStyle : {}}
|
||||
to={menuItem.toLowerCase()}
|
||||
onClick={toggleCollapsed}
|
||||
to={menuItem === "My Profile" ? "/u/" + user.username : "/" + menuItem.toLowerCase()} onClick={toggleCollapsed}
|
||||
>{menuItem}</Link>
|
||||
</NavItem>
|
||||
)}
|
||||
|
@ -60,7 +60,7 @@ const Navigation = () => {
|
|||
style={active === "user" ? activeStyle : {}}
|
||||
className="navLinkMobile"
|
||||
onClick={toggleCollapsed}
|
||||
>{user.username}</Link>
|
||||
>Settings</Link>
|
||||
{user.admin &&
|
||||
<Link
|
||||
to="/admin"
|
||||
|
@ -115,7 +115,7 @@ const Navigation = () => {
|
|||
key={menuItem}
|
||||
className="navLink"
|
||||
style={active === menuItem.toLowerCase() ? activeStyle : {}}
|
||||
to={"/" + menuItem.toLowerCase()}
|
||||
to={menuItem === "My Profile" ? "/u/" + user.username : "/" + menuItem.toLowerCase()}
|
||||
>
|
||||
{menuItem}
|
||||
</Link>
|
||||
|
@ -140,7 +140,7 @@ const Navigation = () => {
|
|||
to="/user"
|
||||
style={active === "user" ? activeStyle : {}}
|
||||
className="navLink"
|
||||
>{user.username}</Link>
|
||||
>Settings</Link>
|
||||
{user.admin &&
|
||||
<Link
|
||||
to="/admin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue