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])
|
||||
|
||||
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 (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user