From 4c7a3811c77b595d84654c8de136cf75b5e93eab Mon Sep 17 00:00:00 2001 From: Anand Suthar Date: Sat, 31 Aug 2024 23:59:26 +0530 Subject: [PATCH] feat : Add message for no recent activity --- .../admin/components/RecentActivity/index.tsx | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/app/(pages)/admin/components/RecentActivity/index.tsx b/app/(pages)/admin/components/RecentActivity/index.tsx index 42771aa..14b3d0e 100644 --- a/app/(pages)/admin/components/RecentActivity/index.tsx +++ b/app/(pages)/admin/components/RecentActivity/index.tsx @@ -4,6 +4,7 @@ import { RiTeamLine, RiCalendarLine, RiHospitalLine, + RiEmotionSadLine, } from "react-icons/ri"; import { ActivityType, RecentUser } from "@pft-types/index"; @@ -39,26 +40,42 @@ export default function RecentActivity({
- {recentUsers.map((user, index) => ( -
-
- {activityIcons[user.title]} -
-
-

{user.title}

-

{user.description}

-
-

{user.timeSince}

+ {recentUsers.length > 0 ? ( +
+ {recentUsers.map((user, index) => ( +
+
+ {activityIcons[user.title]} +
+
+

{user.title}

+

{user.description}

+
+

{user.timeSince}

+
+ ))}
- ))} + ) : ( +
+ +

+ No Recent Activity +

+

+ There are no recent user activities to display. +

+
+ )}