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={{