import { DISCIPLINE_LABELS } from "@autoscholar/schemas"; import Link from "next/link"; const GLYPH: Record = { economics: "∂", finance: "σ", mathematics: "∀", statistics: "Σ", "computer-science": "λ", physics: "ℏ", chemistry: "⚛", biology: "𝔹", medicine: "℞", engineering: "⚙", "earth-sciences": "⊕", "social-sciences": "§", psychology: "ψ", humanities: "¶", law: "⚖", education: "∞", interdisciplinary: "⋈", }; /** DisciplineExplorer — subject navigation from real counts (zero is shown as zero). */ export function DisciplineExplorer({ counts, topics, compact = false, }: { counts: Array<{ discipline: string; n: number }>; topics: Array<{ slug: string }>; compact?: boolean; }) { const entries = Object.entries(DISCIPLINE_LABELS).map(([slug, name]) => ({ slug, name, n: counts.find((c) => c.discipline === slug)?.n ?? 0, href: topics.some((t) => t.slug === slug) ? `/topics/${slug}` : `/research?discipline=${slug}`, })); const sorted = [...entries].sort((a, b) => b.n - a.n || a.name.localeCompare(b.name)); return ( ); }