From 778d792610deb15d3b5608face34714a985fc92f Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:13:59 +0330 Subject: [PATCH] Import source: cshare-app/src/components/ActivityFeed Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- cshare-app/src/components/ActivityFeed.jsx | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 cshare-app/src/components/ActivityFeed.jsx diff --git a/cshare-app/src/components/ActivityFeed.jsx b/cshare-app/src/components/ActivityFeed.jsx new file mode 100644 index 0000000..0da5895 --- /dev/null +++ b/cshare-app/src/components/ActivityFeed.jsx @@ -0,0 +1,71 @@ +import { EyeIcon, DownloadIcon, UploadIcon } from './Icons'; +import { formatActivityTime } from '../data/mockData'; + +const EVENT_CONFIG = { + view: { icon: EyeIcon, color: 'var(--accent)', label: 'Viewed', bg: 'var(--accent-muted)' }, + download: { icon: DownloadIcon, color: 'var(--success)', label: 'Downloaded', bg: 'var(--success-muted)' }, + upload: { icon: UploadIcon, color: '#F5A623', label: 'Uploaded', bg: 'rgba(245, 166, 35, 0.12)' }, +}; + +export function ActivityFeed({ activities }) { + if (!activities || activities.length === 0) return null; + + return ( +
+
+ Recent Activity +
+ +
+ {activities.slice(0, 6).map((event, i) => { + const cfg = EVENT_CONFIG[event.type] || EVENT_CONFIG.view; + const Icon = cfg.icon; + return ( +
+
+ +
+
+
+ {cfg.label} + {' — '} + + {event.fileName} + +
+
+ + {formatActivityTime(event.at)} + +
+ ); + })} +
+
+ ); +}