diff --git a/components/dashboard/src/App.tsx b/components/dashboard/src/App.tsx index 11c1cb75bddfb0..4923f150b9db43 100644 --- a/components/dashboard/src/App.tsx +++ b/components/dashboard/src/App.tsx @@ -151,7 +151,7 @@ export function getURLHash() { } function App() { - const { user, setUser } = useContext(UserContext); + const { user, setUser, refreshUserBillingMode } = useContext(UserContext); const { teams, setTeams } = useContext(TeamsContext); const { setIsDark } = useContext(ThemeContext); @@ -274,6 +274,11 @@ function App() { } }, [user]); + useEffect(() => { + // Refresh billing mode (side effect on other components per UserContext!) + refreshUserBillingMode(); + }, [teams]); + // redirect to website for any website slugs if (isGitpodIo() && isWebsiteSlug(window.location.pathname)) { window.location.host = "www.gitpod.io";