diff --git a/src/ui/pages/component/common/Header.jsx b/src/ui/pages/component/common/Header.jsx index 7b703f9f3..909c9608e 100644 --- a/src/ui/pages/component/common/Header.jsx +++ b/src/ui/pages/component/common/Header.jsx @@ -309,7 +309,7 @@ const Header = () => { /> ); }; - const unseenNotifications = Notification?.filter(notification =>notification?.seen_json && !notification.seen_json[loggedInUserData.id]); + const unseenNotifications = Notification?.length>0 && Notification?.filter(notification =>notification?.seen_json && !notification.seen_json[loggedInUserData.id]); const renderTabs = () => { @@ -851,7 +851,7 @@ const Header = () => { - 0 ? unseenNotifications?.length : null} color="primary"> + @@ -1018,7 +1018,7 @@ const Header = () => { > Notifications - {Notification && Notification?.length > 0 && unseenNotifications && unseenNotifications?.length>0? + {Notification && Notification?.length > 0 ? :null} @@ -1051,9 +1051,9 @@ const Header = () => {
{notification?.title?.split('-')[1]} - {unseenNotifications?.length>0? handleTitleMouseEnter(event, notification?.id)}> + handleTitleMouseEnter(event, notification?.id)}> - :null} +
{`Sent on: ${format(new Date(notification?.created_at), 'MMM d, yyyy')}`}