From 7333f0f50ef799124ce17b5a1e66d48e28ba442a Mon Sep 17 00:00:00 2001 From: Tyler Date: Fri, 19 Jun 2026 19:45:12 -0600 Subject: [PATCH] feat(frontend): refactor ActivityLog page to useActivity + primitives --- src/pages/ActivityLog.tsx | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/pages/ActivityLog.tsx b/src/pages/ActivityLog.tsx index 4b80d93..fedfd99 100644 --- a/src/pages/ActivityLog.tsx +++ b/src/pages/ActivityLog.tsx @@ -1,8 +1,12 @@ -import { useAppStore } from "@/store"; +import { useActivity } from "@/hooks/useActivity"; import { ActivityFeed } from "@/components/ActivityFeed"; +import { Skeleton } from "@/components/ui/skeleton"; +import { EmptyState } from "@/components/ui/empty-state"; +import { ErrorState } from "@/components/ui/error-state"; export function ActivityLog() { - const activity = useAppStore((s) => s.activity); + const { data, isLoading, isError, error, refetch } = useActivity({ limit: 200 }); + const items = data?.items ?? []; return (
@@ -14,12 +18,33 @@ export function ActivityLog() {

Activity log

Every claim submission, denial, payment, and provider event, in - reverse chronological order. + reverse chronological order. Auto-refreshes every 30s.

+ {isError ? ( + refetch()} + /> + ) : null} +
- + {isLoading ? ( +
+ {Array.from({ length: 5 }).map((_, i) => ( + + ))} +
+ ) : items.length === 0 ? ( + + ) : ( + + )}
);