aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorDan Raper <djr2468@gmail.com>2023-04-03 15:22:28 +0100
committerGitHub <noreply@github.com>2023-04-03 15:22:28 +0100
commit6063b22436580ad7f829ac6b06384a22d572d336 (patch)
tree534190de968f7cdff5c98c1a71b6767408f67e97 /modern
parent87e9c7dd5159c1d08368bfafa30fed9ae811933c (diff)
downloadtrackermap-web-6063b22436580ad7f829ac6b06384a22d572d336.tar.gz
trackermap-web-6063b22436580ad7f829ac6b06384a22d572d336.tar.bz2
trackermap-web-6063b22436580ad7f829ac6b06384a22d572d336.zip
Update LoginPage.js
Diffstat (limited to 'modern')
-rw-r--r--modern/src/login/LoginPage.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/modern/src/login/LoginPage.js b/modern/src/login/LoginPage.js
index b572b4ea..59e64bed 100644
--- a/modern/src/login/LoginPage.js
+++ b/modern/src/login/LoginPage.js
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import moment from 'moment';
import {
- useMediaQuery, InputLabel, Select, MenuItem, FormControl, Button, TextField, Link, Snackbar, IconButton, Tooltip,
+ useMediaQuery, InputLabel, Select, MenuItem, FormControl, Button, TextField, Link, Snackbar, IconButton, Tooltip, LinearProgress,
} from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import CloseIcon from '@mui/icons-material/Close';
@@ -54,8 +54,6 @@ const LoginPage = () => {
const [failed, setFailed] = useState(false);
- const [loading, setLoading] = useState(false);
-
const [email, setEmail] = usePersistedState('loginEmail', '');
const [password, setPassword] = useState('');
@@ -126,9 +124,8 @@ const LoginPage = () => {
};
const handleOpenIdLogin = () => {
- setLoading(true);
document.location = '/api/session/openid/auth';
- }
+ };
useEffect(() => nativePostMessage('authentication'), []);
@@ -138,11 +135,10 @@ const LoginPage = () => {
return () => handleLoginTokenListeners.delete(listener);
}, []);
- useEffect(() => {
- if (openIdForced) {
- handleOpenIdLogin();
- }
- }, [openIdForced]);
+ if (openIdForced) {
+ handleOpenIdLogin();
+ return (<LinearProgress />);
+ }
return (
<LoginLayout>