Skip to content

feat: add revenue chart, empty state, avatar uploader, and notification dropdown#1049

Open
Nimatstar wants to merge 8 commits into
DistinctCodes:mainfrom
Nimatstar:feat/fe-nimatstar-components
Open

feat: add revenue chart, empty state, avatar uploader, and notification dropdown#1049
Nimatstar wants to merge 8 commits into
DistinctCodes:mainfrom
Nimatstar:feat/fe-nimatstar-components

Conversation

@Nimatstar
Copy link
Copy Markdown

Summary

Implements four frontend components inside rontend/cntr/ as specified in the linked issues.


[FE-04] Revenue Bar Chart

Files: rontend/cntr/charts/RevenueChart.tsx, RevenueChart.test.tsx

echarts BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer

  • Y-axis and tooltip values formatted as ? using oLocaleString('en-NG')
  • Props: data: { month, revenueKobo }[]

[FE-08] Empty State Component

Files: rontend/cntr/EmptyState/EmptyState.tsx, EmptyState.test.tsx

  • Props: itle (required), description?, icon?, �ction?: { label, onClick }
  • Falls back to lucide-react Inbox icon when none provided
  • Action button only renders when �ction prop is present

[FE-11] Profile Avatar Uploader

Files: rontend/cntr/AvatarUploader/AvatarUploader.tsx, AvatarUploader.test.tsx

  • Accepts JPEG/PNG only - shows error for other types
  • Rejects files > 2MB with error message
  • Preview via URL.createObjectURL, revoked on unmount
  • Keyboard-accessible trigger with �ria-label

[FE-13] Notification Dropdown

Files: rontend/cntr/NotificationDropdown/NotificationDropdown.tsx, NotificationDropdown.test.tsx

  • Bell button toggles dropdown; closes on outside click via useRef + mousedown listener
  • Shows last 10 notifications; unread items have �g-blue-50 background + blue dot indicator
  • Relative timestamps via Intl.RelativeTimeFormat (no external date library)
  • "Mark all read" calls onMarkAllRead prop; "View all" calls onViewAll prop

closes #983
closes #987
closes #990
closes #992

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@Nimatstar is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Nimatstar Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant