papertrail/components/views/ResourceFilter.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

37 lines
1.1 KiB
TypeScript

"use client";
import { VIEW_RESOURCES, RESOURCE_LABELS, type ViewResource } from "./api";
interface ResourceFilterProps {
value: ViewResource | "all";
onChange: (value: ViewResource | "all") => void;
}
// Segmented resource selector for the list page. "All" clears the filter; each
// pill scopes the list to one resource type.
export function ResourceFilter({ value, onChange }: ResourceFilterProps) {
const options: readonly (ViewResource | "all")[] = ["all", ...VIEW_RESOURCES];
return (
<div className="flex flex-wrap items-center gap-2">
{options.map((option) => {
const label = option === "all" ? "All" : RESOURCE_LABELS[option];
const active = value === option;
return (
<button
key={option}
type="button"
onClick={() => onChange(option)}
className={`text-sm rounded-full px-3 py-1 border ${
active
? "bg-accent text-white border-accent"
: "bg-white text-ink/60 border-ink/15 hover:border-accent"
}`}
>
{label}
</button>
);
})}
</div>
);
}