Update plugins/notifications/src/components/NotificationsSideBarItem/NotificationsSideBarItem.tsx

Co-authored-by: Marek Libra <marek.libra@gmail.com>
Signed-off-by: drodil <heiccih@gmail.com>
Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
drodil
2024-04-18 14:31:48 +03:00
committed by Heikki Hellgren
parent f793112df9
commit 42171594db
@@ -38,11 +38,9 @@ export const NotificationsSidebarItem = (props?: {
const {
webNotificationsEnabled = false,
titleCounterEnabled = true,
className,
icon = NotificationsIcon,
text = 'Notifications',
disableHighlight,
noTrack,
...restProps
} = props ?? { webNotificationsEnabled: false, titleCounterEnabled: true };
const { loading, error, value, retry } = useNotificationsApi(api =>
@@ -107,13 +105,11 @@ export const NotificationsSidebarItem = (props?: {
// TODO: Figure out if the count can be added to hasNotifications
return (
<SidebarItem
icon={icon}
to={notificationsRoute()}
text={text}
disableHighlight={disableHighlight}
hasNotifications={!error && !!unreadCount}
className={className}
noTrack={noTrack}
text={text}
icon={icon}
{...restProps}
/>
);
};