sabo/src/components/dashboard/notifications-dropdown.tsx
When to use
- Show recent alerts/messages with quick actions without leaving the page.
Usage
Styling tip
- Keep each item concise; use badges for counts; prefer lazy loading if needed.
Key features
- Unread badge: Shows count of unread notifications in top-right of bell icon
- Sample data: Component includes sample notifications array for demonstration
- Action buttons: Supports accept/decline actions for specific notification types
- Scroll area: Uses
ScrollAreafor long lists without breaking layout
Steps
1
Replace sample data
The component currently uses
sampleNotifications array. Replace with real data from Supabase or your API.2
Implement actions
For notifications with
actionButtons, wire up actual handlers (e.g., accept team invite, approve request).3
Mark as read
Update notification state when clicked or dismissed. This updates the unread count badge.