feature/IO-3096-GlobalNotifications - Code Review Part 1

This commit is contained in:
Dave Richer
2025-03-03 22:14:33 -05:00
parent b9df4c2587
commit a57abec81b
34 changed files with 124 additions and 77 deletions

View File

@@ -18,7 +18,8 @@ const NotificationCenterComponent = ({
toggleUnreadOnly,
markAllRead,
loadMore,
onNotificationClick
onNotificationClick,
unreadCount
}) => {
const { t } = useTranslation();
@@ -61,8 +62,6 @@ const NotificationCenterComponent = ({
);
};
const hasUnread = notifications.some((n) => !n.read);
return (
<div className={`notification-center ${visible ? "visible" : ""}`}>
<div className="notification-header">
@@ -82,9 +81,9 @@ const NotificationCenterComponent = ({
<Tooltip title={t("notifications.labels.mark-all-read")}>
<Button
type="link"
icon={hasUnread ? <CheckCircleFilled /> : <CheckCircleOutlined />}
icon={!unreadCount ? <CheckCircleFilled /> : <CheckCircleOutlined />}
onClick={markAllRead}
disabled={!hasUnread}
disabled={!unreadCount}
/>
</Tooltip>
</div>