diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx index 1f8aaa1..ceac926 100644 --- a/src/components/sidebar/Sidebar.tsx +++ b/src/components/sidebar/Sidebar.tsx @@ -58,7 +58,12 @@ export default function Sidebar() { }, [router.pathname]) useEffect(() => { - api.post('/notify').then(({ data: { data: notifyCount } }) => setNotificationsCount(notifyCount)) + api.post('/notify') + .then(({ data: { data: notifyCount } }) => setNotificationsCount(notifyCount)) + .catch(err => { + console.log(err) + setNotificationsCount(0) + }) }, []) return (