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

View File

@ -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>