Skip to content

Commit

Permalink
Merge pull request #5 from hotfix/notification-count-fix
Browse files Browse the repository at this point in the history
fix: Hiding badge if notification count is 0
  • Loading branch information
dogukanoksuz authored Jun 10, 2024
2 parents 5aeba0d + b0bfa9b commit 4d5979a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/navigation/notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ export default function Notifications() {
>
<Bell className="size-5" />
<span className="sr-only">Notifications</span>
<Badge className="absolute right-0 top-0 rounded-full px-[4px] py-[2px] text-[11px] leading-[11px]">
{getNotSeenNotificationCount()}
</Badge>
{
getNotSeenNotificationCount() > 0 &&
<Badge className="absolute right-0 top-0 rounded-full px-[4px] py-[2px] text-[11px] leading-[11px]" >
{getNotSeenNotificationCount()}
</Badge>
}
</div>
</DropdownMenuTrigger>
<DropdownMenuContent className="mr-5 w-[500px]">
Expand Down

0 comments on commit 4d5979a

Please sign in to comment.