Skip to content

Commit

Permalink
fix: notification indicator (#1955)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline authored Oct 20, 2023
2 parents 0a86d33 + 819831b commit fd78097
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/molecules/AuthSection/auth-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,15 @@ const AuthSection: React.FC = ({}) => {
<Divider type="vertical" className="!h-6 !bg-light-slate-6"></Divider>
</>
)}
<button className="relative cursor-pointer" onClick={() => router.push(`/user/notifications`)}>
<button
className="relative cursor-pointer"
onClick={() => {
if (userInfo && userInfo.notification_count > 0) {
setUserInfo({ ...userInfo, notification_count: 0 });
}
router.push(`/user/notifications`);
}}
>
{userInfo && userInfo.notification_count > 0 && (
<span className="absolute right-0 block w-2 h-2 bg-orange-300 rounded-full"></span>
)}
Expand Down

0 comments on commit fd78097

Please sign in to comment.