clear notification indicator when notifications are received on the notification page

This commit is contained in:
keyan 2023-08-30 20:00:16 -05:00
parent 68e9dfd69c
commit 6042026c87
1 changed files with 2 additions and 1 deletions

View File

@ -11,13 +11,14 @@ export default function NotificationPage ({ ssrData }) {
const client = useApolloClient()
useEffect(() => {
console.log('clearing notifications')
client?.writeQuery({
query: HAS_NOTIFICATIONS,
data: {
hasNewNotes: false
}
})
}, [])
}, [ssrData])
return (
<Layout>