diff --git a/src/js/engagement_view/src/Login.tsx b/src/js/engagement_view/src/Login.tsx index 268f2906a6..cde7abbb6b 100644 --- a/src/js/engagement_view/src/Login.tsx +++ b/src/js/engagement_view/src/Login.tsx @@ -32,9 +32,9 @@ export const LogIn = (_: LoginProps) => { const loginSuccess = await login(values.userName, password); - if (loginSuccess) { + if (await loginSuccess) { window.history.replaceState('/login', "", "/") - console.log("Logged in"); + window.location.reload(); } else { console.warn("Login failed!") } @@ -43,7 +43,7 @@ export const LogIn = (_: LoginProps) => {
@@ -95,7 +95,6 @@ const login = async (username: string, password: string) => { }); const body = await res.json(); - console.log("body", body); return body['success'] === 'True'; } catch (e) { console.log(e);