feature/IO-3096-GlobalNotifications - Code Review Part 1
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user