diff --git a/frontend/src/app/notifications/__MACOSX/._notifications b/frontend/src/app/notifications/__MACOSX/._notifications new file mode 100644 index 00000000..2febfda6 Binary files /dev/null and b/frontend/src/app/notifications/__MACOSX/._notifications differ diff --git a/frontend/src/app/notifications/__MACOSX/notifications/._page.tsx b/frontend/src/app/notifications/__MACOSX/notifications/._page.tsx new file mode 100644 index 00000000..2febfda6 Binary files /dev/null and b/frontend/src/app/notifications/__MACOSX/notifications/._page.tsx differ diff --git a/frontend/src/app/notifications/notifications/page.tsx b/frontend/src/app/notifications/notifications/page.tsx new file mode 100644 index 00000000..dd451079 --- /dev/null +++ b/frontend/src/app/notifications/notifications/page.tsx @@ -0,0 +1,177 @@ +'use client' + +import React, { useMemo, useState } from 'react' +import Image from 'next/image' + +type NotificationCategory = 'all' | 'mentions' | 'system' + +interface NotificationItem { + id: string + title: string + message: string + timeAgo: string + unread: boolean + category: NotificationCategory + icon?: string +} + +const sampleNotifications: NotificationItem[] = [ + { + id: '1', + title: 'New Challenge Invite', + message: 'Alex invited you to a wager match. Streaks are on the line!', + timeAgo: '2m', + unread: true, + category: 'all', + icon: '/join.svg', + }, + { + id: '2', + title: 'You were mentioned', + message: '“@you crushed that last round!” – from the global chat', + timeAgo: '15m', + unread: true, + category: 'mentions', + icon: '/cardline.svg', + }, + { + id: '3', + title: 'System Update', + message: 'Multiplier odds updated for quick matches. See what’s new.', + timeAgo: '1h', + unread: false, + category: 'system', + icon: '/card2line.svg', + }, + { + id: '4', + title: 'Leaderboard Movement', + message: 'You moved up to rank #18. Keep the tempo going!', + timeAgo: '3h', + unread: false, + category: 'all', + icon: '/trophy.png', + }, +] + +export default function NotificationsPage() { + const [activeTab, setActiveTab] = useState('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 + + )} + +
    +
    +
  • + ))} +
+ )} +
+ ) +} + +