Correção ao carregar quantidade de notificações
This commit is contained in:
parent
c19f3651c5
commit
b0c82236aa
@ -58,7 +58,12 @@ export default function Sidebar() {
|
|||||||
}, [router.pathname])
|
}, [router.pathname])
|
||||||
|
|
||||||
useEffect(() => {
|
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 (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user