How can I modify the menu bar to include a log out
button on the right side?
Here is the current code:
<main>
<AppBar>
<Toolbar>
<Typography style={{ marginRight: 16 }} variant="h6" className="text-lg cursor-pointer" onClick={() => redirect("/")}>
Home
</Typography>
<Typography style={{ marginRight: 16 }} variant="h6" className="text-lg cursor-pointer" onClick={() => redirect("/projects")}>
Projects
</Typography>
<Typography style={{ marginRight: 16 }} variant="h6" className="text-lg cursor-pointer" onClick={() => redirect("/team")}>
Goals
</Typography>
{!session &&
<Typography style={{ marginRight: 16 }} variant="h6" className="text-lg cursor-pointer" onClick={() => redirect("/login")}>
Log in
</Typography>
}
{session &&
<Typography variant="h6" className="text-lg cursor-pointer right-0" onClick={() => signOut()}>
log out
</Typography>
}
</Toolbar>
</AppBar>
<Toolbar />
</main>
I have been struggling with this issue for nearly an hour and a half, feeling exhausted.