Skip to content

Commit

Permalink
Login/Logout style
Browse files Browse the repository at this point in the history
  • Loading branch information
wmazoni committed May 1, 2024
1 parent 4737ab4 commit 77e481c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ const Navbar = () => {
</ul>
</div>

<div>
<div className='nav-login-logout'>
{authData.authenticated ? (
<>
<span>{authData.tokenData?.user_name}</span>
<span className='nav-username'>{authData.tokenData?.user_name}</span>
<Link to="#logout" onClick={handleLogoutClick}>
LOGOUT
</Link>
Expand Down
28 changes: 28 additions & 0 deletions frontend/src/components/Navbar/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,31 @@
.main-menu a:hover {
color: #fff;
}

.nav-login-logout {
display: none;
}

.nav-username {
display: none;
}

@media (min-width: 768px) {
.nav-login-logout {
display: unset;
color: #fff;
margin-right: 15px;
}
}

@media (min-width: 992px) {
.nav-login-logout {
display: unset;
color: #fff;
margin-right: 40px;
}
.nav-username {
display: unset;
margin-right: 20px;
}
}

0 comments on commit 77e481c

Please sign in to comment.