|
|
|
@@ -32,7 +32,7 @@ import { Visibility, VisibilityOff } from "@mui/icons-material"; |
|
|
|
import Backdrop from "../../components/MUI/BackdropComponent"; |
|
|
|
import ErrorMessage from "../../components/MUI/ErrorMessageComponent"; |
|
|
|
import { selectIsLoadingByActionType } from "../../store/selectors/loadingSelectors"; |
|
|
|
import { LOGIN_USER_LOADING } from "../../store/actions/login/loginActionConstants"; |
|
|
|
import { LOGIN_USER_LOADING, LOGIN_GOOGLE_USER_LOADING } from "../../store/actions/login/loginActionConstants"; |
|
|
|
import { authScopeStringGetHelper } from "../../util/helpers/authScopeHelpers"; |
|
|
|
import { JWT_TOKEN } from "../../constants/localStorage"; |
|
|
|
const LoginPage = ({ history }) => { |
|
|
|
@@ -73,6 +73,10 @@ const LoginPage = ({ history }) => { |
|
|
|
const isLoading = useSelector( |
|
|
|
selectIsLoadingByActionType(LOGIN_USER_LOADING) |
|
|
|
); |
|
|
|
|
|
|
|
const isGoogleLoading = useSelector( |
|
|
|
selectIsLoadingByActionType(LOGIN_GOOGLE_USER_LOADING) |
|
|
|
); |
|
|
|
|
|
|
|
const handleApiResponseSuccess = () => { |
|
|
|
history.push({ |
|
|
|
@@ -170,7 +174,7 @@ const LoginPage = ({ history }) => { |
|
|
|
onSubmit={formik.handleSubmit} |
|
|
|
sx={{ position: "relative" }} |
|
|
|
> |
|
|
|
<Backdrop position="absolute" isLoading={isLoading} /> |
|
|
|
<Backdrop position="absolute" isLoading={isLoading || isGoogleLoading} /> |
|
|
|
<TextField |
|
|
|
name="username" |
|
|
|
label={t("common.labelUsername")} |