From 460304de7fe248f0173939e185795a54beb53c54 Mon Sep 17 00:00:00 2001 From: faladeleadtheway Date: Fri, 29 Aug 2025 17:22:51 -0700 Subject: [PATCH] Feat: Notification Interface Built --- .../notifications/__MACOSX/._notifications | Bin 0 -> 163 bytes .../__MACOSX/notifications/._page.tsx | Bin 0 -> 163 bytes .../app/notifications/notifications/page.tsx | 177 ++++++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 frontend/src/app/notifications/__MACOSX/._notifications create mode 100644 frontend/src/app/notifications/__MACOSX/notifications/._page.tsx create mode 100644 frontend/src/app/notifications/notifications/page.tsx diff --git a/frontend/src/app/notifications/__MACOSX/._notifications b/frontend/src/app/notifications/__MACOSX/._notifications new file mode 100644 index 0000000000000000000000000000000000000000..2febfda6b1127c82fd93382982ae1c47da8901ce GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K('all') + const [items, setItems] = useState(sampleNotifications) + + const filtered = useMemo(() => { + if (activeTab === 'all') return items + return items.filter(n => n.category === activeTab) + }, [activeTab, items]) + + const unreadCount = useMemo(() => items.filter(n => n.unread).length, [items]) + + const handleMarkAllAsRead = () => { + setItems(prev => prev.map(n => ({ ...n, unread: false }))) + } + + const handleDismiss = (id: string) => { + setItems(prev => prev.filter(n => n.id !== id)) + } + + return ( +
+
+
+
+ bell +
+

Notifications

+ {unreadCount > 0 && ( + + {unreadCount} new + + )} +
+ + +
+ +
+ {([ + { id: 'all', label: 'All' }, + { id: 'mentions', label: 'Mentions' }, + { id: 'system', label: 'System' }, + ] as { id: NotificationCategory; label: string }[]).map(tab => { + const isActive = activeTab === tab.id + return ( + + ) + })} +
+ + {filtered.length === 0 ? ( +
+ empty +

No notifications here yet.

+
+ ) : ( +
    + {filtered.map((n) => ( +
  • +
    +
    + {n.icon ? ( + icon + ) : ( + logo + )} +
    + {n.unread && ( + + )} +
    + +
    +
    +

    {n.title}

    + {n.timeAgo} +
    +

    {n.message}

    +
    + {n.unread && ( + + Unread + + )} + +
    +
    +
  • + ))} +
+ )} +
+ ) +} + +