diff --git a/src/components/Dashboard/context/NotificationContext.jsx b/src/components/Dashboard/context/NotificationContext.jsx index 49acb02..516d8b4 100644 --- a/src/components/Dashboard/context/NotificationContext.jsx +++ b/src/components/Dashboard/context/NotificationContext.jsx @@ -113,17 +113,11 @@ const NotificationProvider = ({ children }) => { const unreadCount = notifications.filter((n) => !n.read).length useEffect(() => { - if (authenticated && notificationCenterVisible) { + if (authenticated == true && notificationCenterVisible == true) { fetchNotifications() } }, [authenticated, notificationCenterVisible, fetchNotifications]) - useEffect(() => { - if (authenticated) { - fetchNotifications() - } - }, [authenticated, fetchNotifications]) - useEffect(() => { setNotificationCenterVisible(false) }, [location.pathname])