Skip to content

Commit 389c2a1

Browse files
committed
Apollo updated
1 parent 9b48cbe commit 389c2a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/Notifications/Notifications.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ export default function TopbarNotification({ id }) {
205205
// });
206206
// }
207207
useEffect(() => {
208+
if(notiData){
208209
let unsubscribe;
209210
console.log(unsubscribe);
210211
unsubscribe = subscribeToMore({
@@ -230,7 +231,8 @@ export default function TopbarNotification({ id }) {
230231
},
231232
})
232233
if (unsubscribe) return () => unsubscribe()
233-
}, []);
234+
}
235+
}, [notiData]);
234236
useEffect(() => {
235237
let unsubscribe;
236238
unsubscribe = subscribeToMoreUnreadNotification({
@@ -281,7 +283,7 @@ export default function TopbarNotification({ id }) {
281283
});
282284
router.push(url);
283285
}
284-
if(!notiLoading) return '...';
286+
if(!notiLoading) return '...'
285287
const content = (
286288
<HeaderWrapper className="topbarNotification" style={{ zIndex: '999' }}>
287289
<div className="isoDropdownHeader">

0 commit comments

Comments
 (0)