diff --git a/frontend/src/app/App.js b/frontend/src/app/App.js index 3c2160be2..683962d6f 100644 --- a/frontend/src/app/App.js +++ b/frontend/src/app/App.js @@ -92,7 +92,7 @@ function App() { setStartPathTime(new Date().getTime()); if (path.indexOf("/event") > 0) { if (!role) { - let direct_path = "/event" + path.split("/event")[1]; + let direct_path = "event" + path.split("/event")[1]; localStorage.setItem("direct_path", direct_path); } } diff --git a/frontend/src/components/LoginForm.js b/frontend/src/components/LoginForm.js index 14d9457d8..4ff6ac23b 100644 --- a/frontend/src/components/LoginForm.js +++ b/frontend/src/components/LoginForm.js @@ -125,10 +125,12 @@ function LoginForm({ role, defaultEmail, location }) { ); let direct_path = localStorage.getItem("direct_path"); if (direct_path) { - history.push(direct_path); setTimeout(() => { - localStorage.removeItem("direct_path"); + history.push(direct_path); }, 1000); + setTimeout(() => { + localStorage.removeItem("direct_path"); + }, 2000); } else { if (role == ACCOUNT_TYPE.HUB) { history.push(location.pathname + REDIRECTS[role]);