From e56f78d16e9d732e435787488854b071874723f5 Mon Sep 17 00:00:00 2001 From: Yasiu1376 Date: Sun, 5 Nov 2023 15:08:29 +0330 Subject: [PATCH] LFFE-15 fixed sidebar bug --- src/components/layouts/Dashboard/Sidebar/SidebarListItem.jsx | 2 +- src/components/layouts/Dashboard/Sidebar/SidebarListSubItem.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/layouts/Dashboard/Sidebar/SidebarListItem.jsx b/src/components/layouts/Dashboard/Sidebar/SidebarListItem.jsx index 5e9039b..e9657a9 100644 --- a/src/components/layouts/Dashboard/Sidebar/SidebarListItem.jsx +++ b/src/components/layouts/Dashboard/Sidebar/SidebarListItem.jsx @@ -15,7 +15,7 @@ const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => { return !hasSubItems ? ( 0 ? notification_count[item.name] : 0} + badgeContent={notification_count ? notification_count[item.name] : 0} color="error" variant="standard" anchorOrigin={{ diff --git a/src/components/layouts/Dashboard/Sidebar/SidebarListSubItem.jsx b/src/components/layouts/Dashboard/Sidebar/SidebarListSubItem.jsx index c94d797..d663d2c 100644 --- a/src/components/layouts/Dashboard/Sidebar/SidebarListSubItem.jsx +++ b/src/components/layouts/Dashboard/Sidebar/SidebarListSubItem.jsx @@ -19,7 +19,7 @@ const SidebarListSubItem = ({item, handleDrawerToggle }) => { const renderBadge = (subitem) => ( 0 ? notification_count[subitem.name] : 0} + badgeContent={notification_count ? notification_count[subitem.name] : 0} color="error" variant="standard" anchorOrigin={{