Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
"use client";
|
||
|
||
// Simple prev/next pager shared by the flag and experiment lists.
|
||
|
||
export function Pagination({
|
||
page,
|
||
limit,
|
||
total,
|
||
onPage,
|
||
}: {
|
||
page: number;
|
||
limit: number;
|
||
total: number;
|
||
onPage: (page: number) => void;
|
||
}) {
|
||
const totalPages = Math.max(1, Math.ceil(total / limit));
|
||
const start = total === 0 ? 0 : (page - 1) * limit + 1;
|
||
const end = Math.min(page * limit, total);
|
||
|
||
return (
|
||
<div className="flex items-center justify-between border-t border-ink/10 px-1 py-3 text-sm text-ink/60">
|
||
<span className="tabular-nums">
|
||
{start}–{end} of {total.toLocaleString()}
|
||
</span>
|
||
<div className="flex items-center gap-2">
|
||
<button
|
||
onClick={() => onPage(page - 1)}
|
||
disabled={page <= 1}
|
||
className="rounded border border-ink/10 px-2.5 py-1 text-xs disabled:cursor-not-allowed disabled:opacity-40 enabled:hover:bg-paper"
|
||
>
|
||
Previous
|
||
</button>
|
||
<span className="tabular-nums text-xs text-ink/40">
|
||
Page {page} / {totalPages}
|
||
</span>
|
||
<button
|
||
onClick={() => onPage(page + 1)}
|
||
disabled={page >= totalPages}
|
||
className="rounded border border-ink/10 px-2.5 py-1 text-xs disabled:cursor-not-allowed disabled:opacity-40 enabled:hover:bg-paper"
|
||
>
|
||
Next
|
||
</button>
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|