Files
Lyra/web/src/app/_ui/contents-nav.tsx
T
Jonathan 4f6c5995f8 feat(web): Library page — owned-albums grid with cover art
New /library: GET /api/library lists LibraryItems enriched with rgMbid + year
from the matching MonitoredRelease. Client renders a cover-art grid with a live
filter; clicking an album opens the AlbumModal (tracklist). Added Library to the
nav. The album-only overview to see everything downloaded.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 15:24:16 +02:00

30 lines
828 B
TypeScript

"use client";
import { usePathname } from "next/navigation";
const LINKS: { href: string; label: string }[] = [
{ href: "/", label: "The Floor" },
{ href: "/library", label: "Library" },
{ href: "/artists", label: "Artists" },
{ href: "/discover", label: "Discover" },
{ href: "/wanted", label: "Wanted" },
];
export function ContentsNav() {
const pathname = usePathname();
const active = (href: string) => (href === "/" ? pathname === "/" : pathname.startsWith(href));
return (
<nav className="contents">
{LINKS.map((l) => (
<a key={l.href} href={l.href} className={active(l.href) ? "here" : ""}>
{l.label}
</a>
))}
<span className="sep" />
<a href="/settings" className={active("/settings") ? "here" : ""}>
Settings
</a>
</nav>
);
}