change notification count number rules

This commit is contained in:
smanylov
2026-05-05 15:30:26 +07:00
parent d419c1c2cb
commit ae0526a58a
+9 -3
View File
@@ -147,12 +147,18 @@ export default function NotificationsButton() {
<svg viewBox="0 0 24 24" fill="currentColor" style={{ width: "20px", height: "20px" }}> <svg viewBox="0 0 24 24" fill="currentColor" style={{ width: "20px", height: "20px" }}>
<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"></path> <path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"></path>
</svg> </svg>
{notificationList?.unreadCount !== 0 && ( {(notificationList?.unreadCount !== 0 && notificationList?.unreadCount !== undefined) ? (
<span <span
className="notification-unread-count" className="notification-unread-count"
style={{ fontSize: getFontSizeByCount(notificationList?.unreadCount) }} /* style={{ fontSize: getFontSizeByCount(notificationList?.unreadCount) }} */
> >
{notificationList?.unreadCount ? notificationList?.unreadCount : ''} {notificationList?.unreadCount > 9 ? '9+' : notificationList?.unreadCount}
</span>
) : (
<span
className="notification-unread-count"
>
0
</span> </span>
)} )}
</button> </button>