From 508078ae29535f63fbaa3214988ede7f9d1ee404 Mon Sep 17 00:00:00 2001 From: Tech4Aditya Date: Tue, 26 May 2026 20:58:59 +0530 Subject: [PATCH] feat: add reusable empty state component for activity feed --- src/components/ActivityFeed.tsx | 11 ++++++++--- src/components/EmptyState.tsx | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 src/components/EmptyState.tsx diff --git a/src/components/ActivityFeed.tsx b/src/components/ActivityFeed.tsx index d770dfee..7a03d866 100644 --- a/src/components/ActivityFeed.tsx +++ b/src/components/ActivityFeed.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; - +import EmptyState from "./EmptyState"; interface EventType { id: string; type: string; @@ -56,9 +56,14 @@ export default function ActivityFeed({ username }: { username: string }) { {loading ? ( -

Loading...

+
+ Fetching recent activity... +
) : events.length === 0 ? ( -

No activity found

+ ) : ( events.slice(0, 10).map((event) => (
+
📭
+ +

+ {title} +

+ + {description && ( +

+ {description} +

+ )} +
+ ); +} \ No newline at end of file