From b783ccce9cceece0e1ebfd3902bb0f61c551bd7f Mon Sep 17 00:00:00 2001 From: srliao <906239+srliao@users.noreply.github.com> Date: Thu, 18 Aug 2022 19:09:16 -0400 Subject: [PATCH] force redirect if on www --- app/src/App.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/App.tsx b/app/src/App.tsx index d654a7983..8f96264a5 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -16,6 +16,15 @@ import { PageUserAccount } from './PageUserAccount'; export default function App() { useTranslation(); + React.useEffect(() => { + let loc = window.location.href; + + if (loc.includes('www.gcsim.app')) { + loc = loc.replace('www.gcsim.app', 'gcsim.app'); + window.location.href = loc; + } + }, [window.location.href]); + return (