Skip to content

Fix #308: Notification badge shows red indicator when unread count is 0#314

Closed
Bolajiomo99 wants to merge 1 commit into
OFFER-HUB:mainfrom
Bolajiomo99:main
Closed

Fix #308: Notification badge shows red indicator when unread count is 0#314
Bolajiomo99 wants to merge 1 commit into
OFFER-HUB:mainfrom
Bolajiomo99:main

Conversation

@Bolajiomo99

Copy link
Copy Markdown
Contributor

Description

This pull request fixes two bugs in the notification system: the red dot badge showing when the unread count is 0, and the "View all notifications" link navigating nowhere.

Changes made

  • Changed badge condition from {true && ( to {unreadCount > 0 && (} in AppHeader.tsx

  • Created /app/notifications page so "View all notifications" link navigates correctly
    🚀 Pull Request
    🔧 Title:
    Fix: Notification badge shows red indicator when unread count is 0
    🛠️ Issue

  • Closes Fix: Notification badge shows red indicator when unread count is 0 #308

📚 Description

The notification badge on the dashboard nav shows a red dot indicator even when the unread notification count is 0. Additionally, the "View all notifications" link/button does not navigate to the notifications page — clicking it does nothing. Reported by testers in manual test #1361.
✅ Changes applied

  • Fixed badge rendering condition in AppHeader.tsx — changed {true && ( to {unreadCount > 0 && (} so the red badge only renders when there are unread notifications
  • Created /app/notifications page at src/app/app/notifications/page.tsx — the dropdown's "View all notifications" link pointed to this route but no page existed. The new page reuses existing NotificationItem and useNotificationStore with infinite scroll, unread count badge, "Mark all as read" button, and empty state
    🔍 Evidence/Media (screenshots/videos)

… count is 0

- Changed badge condition from  to  in AppHeader.tsx
- Created /app/notifications page so 'View all notifications' link navigates correctly

@Josue19-08 Josue19-08 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The badge fix in AppHeader.tsx is correct — changing the condition from {true && ( to {unreadCount > 0 && (} is exactly right. Two issues need to be addressed:

  1. Out-of-scope change. src/app/app/notifications/page.tsx (+147 lines) adds a full notifications page with infinite scroll, mark-all-as-read, and empty state. Issue #308 is specifically about the badge condition — this new page is a separate feature that should be tracked in its own issue and PR. Please remove it from this PR.

  2. PR template not properly formatted. The body mixes a custom description at the top with template content below. Please restructure using the template from .github/PULL_REQUEST_TEMPLATE.md — the description and changes should be inside the template sections, not before it.

@Bolajiomo99
Bolajiomo99 requested a review from Josue19-08 June 30, 2026 07:01
@Bolajiomo99

Copy link
Copy Markdown
Contributor Author

Completed
Kindly review and merge

@Josue19-08 Josue19-08 closed this Jul 15, 2026
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.

Fix: Notification badge shows red indicator when unread count is 0

2 participants