import config from "../config.ts"; import { displayName } from "../lib/users.ts"; import type { SessionUser } from "../middleware/session.ts"; import { Avatar } from "./Avatar.tsx"; interface LayoutProps { user: SessionUser | null; title?: string; children?: JSX.Element | JSX.Element[] | string | null; } export function Layout({ user, title, children }: LayoutProps) { const pageTitle = title ? `${title} — Hearthforge` : "Hearthforge"; return (