Files
the-sunken-reach/frontend/src/components/Layout.tsx
T
joshuaandClaude Opus 5.5 28e1a84b64 V1.2.0: archive/delete campaigns and encounters, encounter sorting, change password, fuller seed
- Campaigns: DM can archive/restore; owner can delete. Archived campaigns
  move off the main list and stop accepting invite codes.
- Encounters: DM can archive/restore and delete, and arrange the campaign's
  own order; the list can also be sorted by name, status, type or date.
  Archived encounters are hidden from players' lists.
- Account page with change password (POST /auth/password).
- Seed is now additive (safe on a live database; --reset for the old wipe)
  and builds a fuller Aldenfell: earned weapons, item pool, spells, NPCs,
  and 28 battle/quest scenes with descriptions, DM notes and rewards.
- Vite preview host config for the deployed site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:58:54 +02:00

37 lines
957 B
TypeScript

import { Link, Outlet } from 'react-router-dom';
import { useAuth } from '../auth/AuthContext';
import { DiceRoller } from './DiceRoller';
export function Layout() {
const { user, logout } = useAuth();
return (
<div className="app-shell">
<header className="topbar">
<Link to="/campaigns" className="topbar-brand">
<span className="die" aria-hidden>
⚄
</span>
The Sunken Reach
</Link>
<nav className="topbar-nav">
{user && (
<div className="topbar-user">
<Link to="/account" title="Account settings">
{user.displayName}
</Link>
<button className="btn btn-ghost" onClick={logout}>
Log out
</button>
</div>
)}
</nav>
</header>
<main className="page">
<Outlet />
</main>
<DiceRoller />
</div>
);
}