Skip to content

Commit

Permalink
fix: Hidind badge if notification count is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
duyguolmez committed Jun 10, 2024
1 parent 5aeba0d commit b0bfa9b
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 b0bfa9b

Please sign in to comment.