Skip to content

feat: add in-app notification system for received tips (#92)#193

Merged
Mosas2000 merged 2 commits intomainfrom
feature/notification-system
Feb 26, 2026
Merged

feat: add in-app notification system for received tips (#92)#193
Mosas2000 merged 2 commits intomainfrom
feature/notification-system

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Changes

New Files

  • hooks/useNotifications.js — Polls contract events every 30s, tracks received tips, stores last-seen timestamp in localStorage for unread count
  • components/NotificationBell.jsx — Bell icon with red badge count, dropdown showing recent received tips with sender, amount, message

Modified Files

  • App.jsx — Integrates useNotifications hook, passes props to Header
  • Header.jsx — Renders NotificationBell next to theme toggle when user is connected

Features

  • Notification badge shows unread count (caps at 9+)
  • Dropdown lists up to 20 recent received tips
  • "Mark all read" button and auto-mark on dropdown open
  • Click outside to dismiss dropdown
  • Graceful error handling for API failures

29 frontend tests passing, build clean

Closes #92

- Add useNotifications hook that polls contract events for received tips
- Store last-seen timestamp in localStorage for unread count tracking
- Create NotificationBell component with badge count and dropdown
- Show sender address, amount, and message for each notification
- Auto-poll every 30 seconds for new tips
- Add useNotifications hook to App.jsx with user address
- Pass notification props to Header component
- Render NotificationBell next to theme toggle when logged in
- Mark all notifications read when dropdown opens
@Mosas2000 Mosas2000 merged commit a164059 into main Feb 26, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a notification system for received tips

1 participant