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>
34 lines
1007 B
TypeScript
34 lines
1007 B
TypeScript
import type { ReactNode } from "react";
|
|
import type { DashboardLayout, ResolvedWidget } from "./types";
|
|
import { WidgetCard } from "./WidgetCard";
|
|
|
|
interface DashboardGridProps {
|
|
layout: DashboardLayout;
|
|
widgets: ResolvedWidget[];
|
|
// Optional per-widget action slot (used by the editor).
|
|
renderActions?: (widget: ResolvedWidget) => ReactNode;
|
|
}
|
|
|
|
// Renders resolved widgets in a responsive CSS grid driven by the dashboard's
|
|
// saved layout (columns + gap).
|
|
export function DashboardGrid({ layout, widgets, renderActions }: DashboardGridProps) {
|
|
const columns = Math.min(Math.max(layout.columns, 1), 12);
|
|
return (
|
|
<div
|
|
className="grid"
|
|
style={{
|
|
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
gap: `${layout.gap}px`,
|
|
}}
|
|
>
|
|
{widgets.map((widget) => (
|
|
<WidgetCard
|
|
key={widget.widgetId}
|
|
widget={widget}
|
|
actions={renderActions ? renderActions(widget) : undefined}
|
|
/>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|