From 7cf364e03a0ba228edfd00cb29efa439664e7716 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 2 Jun 2026 10:17:05 +0200 Subject: [PATCH] feat(reports): shared ReportEmptyState component Co-Authored-By: Claude Opus 4.8 (1M context) --- .../reports/shared/report-empty-state.tsx | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/components/reports/shared/report-empty-state.tsx diff --git a/src/components/reports/shared/report-empty-state.tsx b/src/components/reports/shared/report-empty-state.tsx new file mode 100644 index 00000000..ee41f905 --- /dev/null +++ b/src/components/reports/shared/report-empty-state.tsx @@ -0,0 +1,39 @@ +import Link from 'next/link'; +import type { Route } from 'next'; +import type { LucideIcon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; + +interface ReportEmptyStateProps { + icon: LucideIcon; + title: string; + body: string; + actionLabel: string; + actionHref: Route; +} + +/** + * Report-level empty state. Rendered when a report's `hasData` flag is + * false (the port has no underlying data at all), in place of the report + * body — distinct from the per-chart "no data in this window" states. + */ +export function ReportEmptyState({ + icon: Icon, + title, + body, + actionLabel, + actionHref, +}: ReportEmptyStateProps) { + return ( +
+
+ +
+

{title}

+

{body}

+ +
+ ); +}