Skip to content

Commit

Permalink
fix: not clickable when have notifications (#523)
Browse files Browse the repository at this point in the history
Co-authored-by: Braian Mellor <[email protected]>
  • Loading branch information
lauti7 and braianj authored Jul 15, 2024
1 parent 0f2aa5e commit a968a67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
10 changes: 2 additions & 8 deletions src/components/Notifications/Notifications.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@
position: relative;
}

.dcl.notifications > div:first-child {
width: 32px;
height: 32px;
}

.dcl.notifications-bell {
display: flex;
background: none;
border: none;
padding: 0;
margin: 0;
transition: filter 0.2s ease;
cursor: pointer;
align-items: center;
position: relative;
}

Expand All @@ -31,8 +26,7 @@
width: 16px;
height: 16px;
position: relative;
top: -24px;
left: 19px;
left: -13px;
cursor: pointer;
}

Expand Down
18 changes: 8 additions & 10 deletions src/components/Notifications/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,19 @@ export default function Notifications({

return (
<div className="dcl notifications">
<div>
<button
className={classNames('dcl notifications-bell', {
'notifications-active': newNotificationsCount > 0
})}
onClick={onClick}
>
{!isOpen ? <NotificationBell /> : <NotificationBellActive />}
</button>
<button
className={classNames('dcl notifications-bell', {
'notifications-active': newNotificationsCount > 0
})}
onClick={onClick}
>
{!isOpen ? <NotificationBell /> : <NotificationBellActive />}
{!isOpen && newNotificationsCount > 0 && (
<div className="dcl notifications-counter">
<Counter count={newNotificationsCount} />
</div>
)}
</div>
</button>
{isOpen && (
<NotificationsFeed
isOpen={isOpen}
Expand Down

0 comments on commit a968a67

Please sign in to comment.