Files
sorsfonalak/services/frontend/src/components/SiteHeader.tsx
T
fecoandClaude Opus 5.5 0791998c13
CI / test (push) Failing after 41s
CI / build (push) Skipped
CI / deploy (push) Skipped
Own chart back on the Képletem menu; persons get their own menu, page and a tile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-17 11:20:26 +00:00

34 lines
821 B
TypeScript

import Link from "next/link";
import type { Me } from "@/lib/types";
import { LogoutButton } from "./LogoutButton";
import { NavLinks } from "./NavLinks";
export function Logo() {
return (
<Link href="/" className="logo">
sors<span>fonalak</span>
</Link>
);
}
export function SiteHeader({ me }: { me: Me }) {
const links = [
{ href: "/keplet", label: "Képletem" },
{ href: "/szemelyek", label: "Személyek" },
{ href: "/profil", label: "Profil" },
];
if (me.user.roles.includes("admin")) links.push({ href: "/admin", label: "Admin" });
return (
<header className="site-header">
<Logo />
<NavLinks links={links} />
<div className="who">
<span>{me.user.display_name || me.user.email}</span>
<LogoutButton />
</div>
</header>
);
}