import Link from "next/link"; import type { Me } from "@/lib/types"; import { NavLinks } from "./NavLinks"; import { UserMenu } from "./UserMenu"; /** The mark: the orbit, the thread (an S, with the crossbar an f) and a star on the rim. */ export function LogoMark({ className = "logo-mark" }: { className?: string }) { return ( ); } export function Logo() { return ( sorsfonalak ); } /** * The header for visitors (not logged in): the home page sections and the * example, then, set apart, the free tools, and the login. `onHome`: the * section links stay on the page. */ export function PublicHeader({ onHome = false, current, }: { onHome?: boolean; current?: "pelda" | "horoszkop" | "csillagjegyek"; }) { const home = onHome ? "" : "/"; const here = (page: typeof current) => (current === page ? "page" : undefined); return (
Belépés
); } /** The user's package and what is left of it; leads to the packages page. */ function PackageBadge({ me }: { me: Me }) { const { natal, synastry } = me.analyses_left; const left = natal + synastry; let name: string; let detail: string | null; if (me.package) { name = me.package.name; detail = left > 0 ? `${left} elemzés` : "elfogyott"; } else if (left > 0) { name = `${left} elemzés`; detail = null; } else { return null; } const units = `Képletelemzés: ${natal}, kapcsolati elemzés: ${synastry}`; const empty = left === 0; return ( {name} {detail && {detail}} ); } export function SiteHeader({ me }: { me: Me }) { const links = [ { href: "/keplet", label: "Képletem" }, { href: "/szemelyek", label: "Személyek" }, { href: "/osszevetesek", label: "Összevetések" }, { href: "/kartyajoslas", label: "Kártyajóslás" }, { href: "/csomagok", label: "Csomagok" }, ]; if (me.user.roles.includes("admin")) links.push({ href: "/admin", label: "Admin" }); return (
0} />
); }