clear notification indicator when notifications are received on the notification page
This commit is contained in:
parent
68e9dfd69c
commit
6042026c87
@ -11,13 +11,14 @@ export default function NotificationPage ({ ssrData }) {
|
|||||||
const client = useApolloClient()
|
const client = useApolloClient()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log('clearing notifications')
|
||||||
client?.writeQuery({
|
client?.writeQuery({
|
||||||
query: HAS_NOTIFICATIONS,
|
query: HAS_NOTIFICATIONS,
|
||||||
data: {
|
data: {
|
||||||
hasNewNotes: false
|
hasNewNotes: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, [])
|
}, [ssrData])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user