From d737950a3dabf8d8d81ff37896c128679eadfb66 Mon Sep 17 00:00:00 2001 From: Joel Brock Date: Fri, 5 Jun 2026 14:43:19 -0700 Subject: [PATCH] Report: extract Loading/Empty/Error states to components/report/ --- components/ReportView.tsx | 37 +---------------------------- components/report/ReportStates.tsx | 38 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 components/report/ReportStates.tsx diff --git a/components/ReportView.tsx b/components/ReportView.tsx index ed920c2..71ecc29 100644 --- a/components/ReportView.tsx +++ b/components/ReportView.tsx @@ -24,6 +24,7 @@ import { MEMBERS_ACTUAL_NAME, MEMBERS_GOAL_NAME, } from "./report/MembershipChart"; +import { LoadingState, EmptyState, ErrorState } from "./report/ReportStates"; interface ReportViewProps { config: FormConfig; @@ -483,39 +484,3 @@ function MobileStem({ show, state }: { show: boolean; state: PathwayState }) { ); } -function LoadingState() { - return ( -
-
-

Loading your activity report…

-
- ); -} - -function EmptyState() { - return ( -
-

No entries on file yet.

-

- Your co-op's first survey will appear here once it's submitted. -

-
- ); -} - -function ErrorState({ message }: { message: string }) { - return ( -
-

- We couldn't open your report. -

-

{message}

-

- If this keeps happening, please contact your Chris @ FCI. -

-
- ); -} diff --git a/components/report/ReportStates.tsx b/components/report/ReportStates.tsx new file mode 100644 index 0000000..284b6f0 --- /dev/null +++ b/components/report/ReportStates.tsx @@ -0,0 +1,38 @@ +"use client"; + +export function LoadingState() { + return ( +
+
+

Loading your activity report…

+
+ ); +} + +export function EmptyState() { + return ( +
+

No entries on file yet.

+

+ Your co-op's first survey will appear here once it's submitted. +

+
+ ); +} + +export function ErrorState({ message }: { message: string }) { + return ( +
+

+ We couldn't open your report. +

+

{message}

+

+ If this keeps happening, please contact your Chris @ FCI. +

+
+ ); +}