papertrail/components/sso/Pagination.tsx
caelum0x 695a365ae4 feat: PaperTrail — enterprise evidence-verification platform
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>
2026-07-08 07:21:22 +03:00

46 lines
1.2 KiB
TypeScript

"use client";
// Simple prev/next pager for the SSO module lists. Renders nothing when there's
// only a single page. Presentational — parent owns page state.
interface PaginationProps {
page: number;
total: number;
pageSize: number;
onPageChange: (page: number) => void;
}
export function Pagination({
page,
total,
pageSize,
onPageChange,
}: PaginationProps) {
const pageCount = Math.max(1, Math.ceil(total / pageSize));
if (pageCount <= 1) return null;
return (
<div className="px-5 py-3 border-t border-ink/10 flex items-center justify-between text-xs text-ink/50">
<span>
Page {page} of {pageCount}
</span>
<div className="flex items-center gap-2">
<button
onClick={() => onPageChange(page - 1)}
disabled={page <= 1}
className="border border-ink/15 rounded px-3 py-1 disabled:opacity-40 hover:border-accent"
>
Previous
</button>
<button
onClick={() => onPageChange(page + 1)}
disabled={page >= pageCount}
className="border border-ink/15 rounded px-3 py-1 disabled:opacity-40 hover:border-accent"
>
Next
</button>
</div>
</div>
);
}