fix change password showing on login dialog

This commit is contained in:
ammarahm-ed
2020-12-15 14:19:22 +05:00
parent d63d52d322
commit 43ad459aee

View File

@@ -64,7 +64,7 @@ const LoginDialog = () => {
const [failed, setFailed] = useState(false);
const [signingIn, setSigningIn] = useState(false);
const [userConsent, setUserConsent] = useState(false);
const [mode, setMode] = useState(MODES.changePassword);
const [mode, setMode] = useState(MODES.login);
const _email = useRef();
const _pass = useRef();
@@ -140,9 +140,9 @@ const LoginDialog = () => {
}, []);
function open(mode) {
if (mode) {
setMode(mode);
}
setMode(mode? mode : MODES.login);
setVisible(true);
}