Skip to content

Commit

Permalink
Refresh news on tab focus
Browse files Browse the repository at this point in the history
  • Loading branch information
insmac committed Oct 4, 2023
1 parent 2d8dcbf commit 92d630d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/web-console/src/scenes/News/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ const News = () => {

// Get Enterprise News on render
useEffect(() => {
getEnterpriseNews()
void getEnterpriseNews()
window.addEventListener("focus", getEnterpriseNews)
return () => window.removeEventListener("focus", getEnterpriseNews)
}, [])

// Compute unread news
Expand Down

0 comments on commit 92d630d

Please sign in to comment.