{locale === "fr" && p.title_fr ? p.title_fr : p.title}
{excerpt(p, 260)}
import Link from "next/link";
import { FileText } from "lucide-react";
import { fmtDate, fmtInt, href, t, type Locale } from "@/lib/i18n";
import type { PaperSummary } from "@/lib/papers/types";
export function AuthorsLine({ authors, locale, link = true }: { authors: PaperSummary["authors"]; locale: Locale; link?: boolean }) {
return {authors.map((a, i) => {i > 0 && (i === authors.length - 1 ? (locale === "fr" ? " et " : " and ") : ", ")}{link ? {a.display_name} : a.display_name})};
}
export function StatusChips({ p, locale }: { p: PaperSummary; locale: Locale }) {
const d = t(locale);
return (
{p.status !== "published" && {d.misc.status[p.status as keyof typeof d.misc.status]}}
{p.publication_status !== "working_paper" && {d.misc.pubStatus[p.publication_status as keyof typeof d.misc.pubStatus]}}
{p.notice && {p.notice}}
{p.has_pdf ? {excerpt(p, 260)} {p.subtitle} {excerpt(p)}{locale === "fr" && p.title_fr ? p.title_fr : p.title}
{locale === "fr" && p.title_fr ? p.title_fr : p.title}
{!compact && p.subtitle &&
| {d.papers.number} | {d.paper.identifier} | {d.paper.authors} | {d.paper.year} | {d.paper.version} | {d.paper.domain} | {d.paper.pagesLabel} | {d.paper.viewsLabel} | {d.paper.downloadsLabel} |
|---|---|---|---|---|---|---|---|---|
| {p.identifier} | {p.title} | {p.year ?? ""} | {p.version_label ?? ""} | {p.domain ? (locale === "fr" ? p.domain.name_fr : p.domain.name_en) : ""} | {p.pages ?? ""} | {fmtInt(locale, p.view_count)} | {fmtInt(locale, p.download_count)} |