spb/autoscholar
Public
1import { listSeries } from "@autoscholar/core";2import type { Metadata } from "next";3import Link from "next/link";4import { EmptyState } from "@/components/EmptyState";5import { db } from "@/lib/server/db";67export const dynamic = "force-dynamic";8export const metadata: Metadata = { title: "Working-paper series", alternates: { canonical: "/series" } };910export default async function SeriesPage() {11 const rows = await listSeries(db());12 return (13 <div className="space-y-8">14 <header>15 <p className="eyebrow">Collections</p>16 <h1 className="serif mt-1 text-3xl font-semibold">Working-paper series</h1>17 <p className="muted mt-2 max-w-2xl text-sm">18 Papers are numbered in a stable series (AS-WP-YEAR-NNNN). Numbers are allocated inside the19 publication transaction and never reused, even after a retraction.20 </p>21 </header>22 {rows.length === 0 ? (23 <EmptyState title="No series configured." />24 ) : (25 <ul className="grid gap-3 md:grid-cols-2">26 {rows.map((s) => (27 <li key={s.id} className="surface p-5">28 <Link29 href={`/research?series=${s.slug}`}30 className="serif text-lg font-semibold no-underline hover:underline"31 >32 {s.name}33 </Link>34 <p className="subtle mt-1 font-mono text-xs">35 {s.paperCount} {s.paperCount === 1 ? "paper" : "papers"}36 </p>37 {s.description && <p className="muted mt-2 text-sm">{s.description}</p>}38 </li>39 ))}40 </ul>41 )}42 </div>43 );44}45