Web: Login: add loader
This commit is contained in:
parent
f161598193
commit
5a355090dd
@ -38,6 +38,7 @@ import {
|
||||
LoginContainer,
|
||||
LoginFormWrapper,
|
||||
} from "./StyledLogin";
|
||||
import AppLoader from "@appserver/common/components/AppLoader";
|
||||
|
||||
const settings = {
|
||||
minLength: 6,
|
||||
@ -65,6 +66,8 @@ const Form = (props) => {
|
||||
|
||||
const [errorText, setErrorText] = useState("");
|
||||
|
||||
const [isLoaded, setIsLoaded] = useState(false);
|
||||
|
||||
const { t } = useTranslation("Login");
|
||||
|
||||
const {
|
||||
@ -110,7 +113,6 @@ const Form = (props) => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getSso();
|
||||
const profile = localStorage.getItem("profile");
|
||||
if (!profile) return;
|
||||
|
||||
@ -157,11 +159,14 @@ const Form = (props) => {
|
||||
error && setErrorText(error);
|
||||
confirmedEmail && setIdentifier(confirmedEmail);
|
||||
|
||||
await setProviders();
|
||||
await getSso();
|
||||
setIsLoaded(true);
|
||||
|
||||
focusInput();
|
||||
|
||||
window.authCallback = authCallback;
|
||||
|
||||
await setProviders();
|
||||
//window.addEventListener("keyup", throttledKeyPress, false);
|
||||
|
||||
/*return () => {
|
||||
@ -343,6 +348,7 @@ const Form = (props) => {
|
||||
|
||||
//console.log("Login render");
|
||||
|
||||
if (!isLoaded) return <AppLoader />;
|
||||
return (
|
||||
<LoginContainer>
|
||||
<Text
|
||||
|
Loading…
Reference in New Issue
Block a user