feat(web): update navigation with Play and Multiplayer links
- Add Play link to /play - Add Multiplayer link to /multiplayer - Remove About link (route kept, just not linked) - Simplify signOut onClick to .then() chain
This commit is contained in:
parent
f2eb6ce17f
commit
974646ebfb
1 changed files with 12 additions and 8 deletions
|
|
@ -17,18 +17,22 @@ const RootLayout = () => {
|
||||||
<Link to="/" className="[&.active]:font-bold">
|
<Link to="/" className="[&.active]:font-bold">
|
||||||
Home
|
Home
|
||||||
</Link>
|
</Link>
|
||||||
<Link to="/about" className="[&.active]:font-bold">
|
<Link to="/play" className="[&.active]:font-bold">
|
||||||
About
|
Play
|
||||||
|
</Link>
|
||||||
|
<Link to="/multiplayer" className="[&.active]:font-bold">
|
||||||
|
Multiplayer
|
||||||
</Link>
|
</Link>
|
||||||
<div className="ml-auto">
|
<div className="ml-auto">
|
||||||
{session ? (
|
{session ? (
|
||||||
<button
|
<button
|
||||||
className="text-sm text-gray-600 hover:text-gray-900"
|
className="text-sm text-gray-600 hover:text-gray-900"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
void (async () => {
|
void signOut()
|
||||||
await signOut();
|
.then(() => {
|
||||||
void navigate({ to: "/" });
|
void navigate({ to: "/" });
|
||||||
})().catch((err) => {
|
})
|
||||||
|
.catch((err) => {
|
||||||
console.error("Sign out error:", err);
|
console.error("Sign out error:", err);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue