changed login styles
This commit is contained in:
parent
3c9d8e4822
commit
6e4506adc2
@ -5,7 +5,6 @@ import Container from "@mui/material/Container";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import Button from "@mui/material/Button";
|
||||
import hsbcLogo from "../../assets/logo-png.png";
|
||||
import zoomLogo from "../../assets/zoom.png";
|
||||
import LoginIcon from "@mui/icons-material/Login";
|
||||
import useAuth from "../../hooks/useAuth";
|
||||
import axios from "../../api/axios";
|
||||
@ -30,6 +29,7 @@ const Login: React.FC = () => {
|
||||
|
||||
const [email, setEmail] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const [hasError, setHasError] = useState(false);
|
||||
// const [errMsg, setErrMsg] = useState('');
|
||||
|
||||
// const userRef = useRef();
|
||||
@ -73,6 +73,7 @@ const Login: React.FC = () => {
|
||||
if (logedInUserId != undefined) {
|
||||
setAuth["uuid"] = logedInUserId;
|
||||
setAuth["isLoggedIn"] = true;
|
||||
setHasError(false);
|
||||
store.dispatch(fetchMeetings(logedInUserId));
|
||||
store.dispatch(fetchUsers(logedInUserId));
|
||||
store.dispatch(fetchFavorites(logedInUserId));
|
||||
@ -81,6 +82,7 @@ const Login: React.FC = () => {
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
setHasError(true);
|
||||
}
|
||||
setEmail(email);
|
||||
setPassword("");
|
||||
@ -109,6 +111,8 @@ const Login: React.FC = () => {
|
||||
variant="outlined"
|
||||
value={password}
|
||||
placeholder="Password"
|
||||
error={hasError}
|
||||
helperText={hasError ? "Email or Password Incorrect!" : ""}
|
||||
type="password"
|
||||
onChange={(event) => {
|
||||
setPassword(event.target.value);
|
||||
|
||||
@ -78,7 +78,7 @@ const Body: React.FC<Props> = ({ meeting }) => {
|
||||
hourMod +
|
||||
":" +
|
||||
// isoTime.slice(3, 5) +
|
||||
date.getMinutes() +
|
||||
(date.getMinutes() < 10 ? "0" + date.getMinutes() : "" + date.getMinutes()) +
|
||||
(hour > 11 ? "PM" : "AM")
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user