Skip to content

Commit f8b389a

Browse files
committed
[dashboard] users to www when logged out
We want to redirect not logged in users from the root URL with no additional context provided to the website. fixes #3898
1 parent 22f5876 commit f8b389a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

components/dashboard/src/App.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ function App() {
7979
}
8080
window.removeEventListener('storage', updateTheme);
8181
}
82-
}, [localStorage.theme]);
82+
}, []);
83+
84+
if ((window.location.hostname === 'gitpod.io' || window.location.hostname === 'gitpod-staging.com' || window.location.hostname.endsWith('gitpod-dev.com'))
85+
&& window.location.pathname === '/' && window.location.hash === '' && !loading && !user) {
86+
window.location.href = `https://www.gitpod.io`;
87+
return <div></div>;
88+
}
8389

8490
if (loading) {
8591
return <Loading />

0 commit comments

Comments
 (0)