mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-27 09:16:13 +08:00
fixed page changing twice on sign out
This commit is contained in:
parent
9fe003aeab
commit
a008fef06c
1 changed files with 12 additions and 10 deletions
|
|
@ -266,16 +266,18 @@ const authListener = firebase.auth().onAuthStateChanged(async function (user) {
|
|||
}
|
||||
PageTransition.set(false);
|
||||
}
|
||||
if (window.location.pathname == "/login" && user) {
|
||||
PageController.change("account");
|
||||
} else if (window.location.pathname != "/account") {
|
||||
PageController.change();
|
||||
setTimeout(() => {
|
||||
Focus.set(false);
|
||||
}, 125 / 2);
|
||||
} else {
|
||||
Account.update();
|
||||
// SignOutButton.show();
|
||||
if (user) {
|
||||
if (window.location.pathname == "/login") {
|
||||
PageController.change("account");
|
||||
} else if (window.location.pathname != "/account") {
|
||||
PageController.change();
|
||||
setTimeout(() => {
|
||||
Focus.set(false);
|
||||
}, 125 / 2);
|
||||
} else {
|
||||
Account.update();
|
||||
// SignOutButton.show();
|
||||
}
|
||||
}
|
||||
|
||||
let theme = Misc.findGetParameter("customTheme");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue