Skip to content

Commit

Permalink
add Sign in Button
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii committed Mar 10, 2024
1 parent 0b24ef9 commit 1cfd1e3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions website/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import IconButton from "@mui/material/IconButton";
import Brightness4Icon from '@mui/icons-material/Brightness4';
import Brightness7Icon from '@mui/icons-material/Brightness7';
import LogoutIcon from '@mui/icons-material/Logout';
import LoginIcon from '@mui/icons-material/Login';
import {useMediaQuery} from "@mui/material";

const useStyles = makeStyles((theme) => ({
Expand Down Expand Up @@ -54,12 +55,18 @@ export default function Navigation() {
</Link>
)}

{hasAuthCookie && (
{hasAuthCookie ? (
<Link href="/signout" color="inherit">
<IconButton sx={{ ml: 1 }} color="inherit" title="Logout">
<IconButton sx={{ ml: 1 }} color="inherit" title="Logout">
<LogoutIcon />
</IconButton>
</Link>
) : (
<Link href="/signin" color="inherit">
<IconButton sx={{ ml: 1 }} color="inherit" title="Login">
<LoginIcon />
</IconButton>
</Link>
)}
</Toolbar>
</AppBar>
Expand Down

0 comments on commit 1cfd1e3

Please sign in to comment.