Skip to content

Commit

Permalink
fix redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Oct 2, 2024
1 parent 2d98dce commit 0d0f3c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/frontend/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function LoginPage() {
}

auth.setJwt(token);
router.push("/");
analytics.track("Login", { method: "password" });
} catch (error) {
console.error(error);
Expand Down Expand Up @@ -142,9 +143,12 @@ function LoginPage() {
const email = router.query.email
? decodeURIComponent(router.query.email as string)
: "";
if (email) {
console.log(form.values.password);
if (email && !form.values.email) {
console.log("here");
form.setFieldValue("email", email);
determineAuthMethod(email);
console.log(step);
}
}, [router.query.email]);

Expand Down

0 comments on commit 0d0f3c0

Please sign in to comment.