diff --git a/src/ui/common/src/components/layouts/menuSidebar.tsx b/src/ui/common/src/components/layouts/menuSidebar.tsx index 37ff987c2..7ffb3322f 100644 --- a/src/ui/common/src/components/layouts/menuSidebar.tsx +++ b/src/ui/common/src/components/layouts/menuSidebar.tsx @@ -18,7 +18,7 @@ import { useLocation } from 'react-router-dom'; import { handleFetchNotifications } from '../../reducers/notifications'; import { AppDispatch, RootState } from '../../stores/store'; import UserProfile from '../../utils/auth'; -import { NotificationStatus } from '../../utils/notifications'; +import { NotificationStatus, NotificationLogLevel } from '../../utils/notifications'; import NotificationsPopover from '../notifications/NotificationsPopover'; import styles from './menu-sidebar-styles.module.css'; @@ -115,7 +115,8 @@ const MenuSidebar: React.FC<{ user: UserProfile }> = ({ user }) => { const numUnreadNotifications = useSelector( (state: RootState) => state.notificationsReducer.notifications.filter( - (notification) => notification.status === NotificationStatus.Unread + (notification) => notification.level !== NotificationLogLevel.Success && + notification.status === NotificationStatus.Unread ).length ); diff --git a/src/ui/common/src/components/notifications/NotificationsPopover.tsx b/src/ui/common/src/components/notifications/NotificationsPopover.tsx index f494f4621..fc414846b 100644 --- a/src/ui/common/src/components/notifications/NotificationsPopover.tsx +++ b/src/ui/common/src/components/notifications/NotificationsPopover.tsx @@ -8,7 +8,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { handleArchiveAllNotifications } from '../../reducers/notifications'; import { AppDispatch, RootState } from '../../stores/store'; import UserProfile from '../../utils/auth'; -import { NotificationAssociation } from '../../utils/notifications'; +import { NotificationAssociation, NotificationLogLevel} from '../../utils/notifications'; import { Notification } from '../../utils/notifications'; import { Tab, Tabs } from '../primitives/Tabs.styles'; import NotificationListItem from './NotificationListItem'; @@ -53,6 +53,9 @@ export const NotificationsPopover: React.FC = ({ const filteredNotifications: Notification[] = notifications .filter((notification: Notification) => { + if (notification.level === NotificationLogLevel.Success) { + return false + } const association = notification.association.object; if (activeTab === NotificationsTabs.All) { return true;