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="container-x section-tight space-y-8">14 <header className="max-w-2xl">15 <p className="eyebrow">Collections</p>16 <h1 className="title-1 mt-2">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 card-link relative p-6">28 <Link29 href={`/research?series=${s.slug}`}30 className="title-2 no-underline after:absolute after:inset-0 hover:underline"31 >32 {s.name}33 </Link>34 <p className="mono-id mt-2">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