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:
lila 2026-04-18 10:59:50 +02:00
parent f2eb6ce17f
commit 974646ebfb

View file

@ -17,20 +17,24 @@ const RootLayout = () => {
<Link to="/" className="[&.active]:font-bold">
Home
</Link>
<Link to="/about" className="[&.active]:font-bold">
About
<Link to="/play" className="[&.active]:font-bold">
Play
</Link>
<Link to="/multiplayer" className="[&.active]:font-bold">
Multiplayer
</Link>
<div className="ml-auto">
{session ? (
<button
className="text-sm text-gray-600 hover:text-gray-900"
onClick={() => {
void (async () => {
await signOut();
void navigate({ to: "/" });
})().catch((err) => {
console.error("Sign out error:", err);
});
void signOut()
.then(() => {
void navigate({ to: "/" });
})
.catch((err) => {
console.error("Sign out error:", err);
});
}}
>
Sign out ({session.user.name})