merge conflict fixes

This commit is contained in:
Taehee Choi
2022-03-13 18:37:40 -07:00
parent 20e8c79bb9
commit 97ed807785
4 changed files with 81 additions and 99 deletions
+24 -3
View File
@@ -13,6 +13,8 @@ interface LocationState {
from: { pathname: string };
}
const Login: React.FC = () => {
const setAuth = useAuth();
const navigate = useNavigate();
const location = useLocation();
const state = location.state as LocationState;
@@ -38,7 +40,7 @@ const Login: React.FC = () => {
// setAuth({username: username, isLoggedIn: true});
setAuth["username"] = username;
setAuth["isLoggedIn"] = true;
navigate(from, {replace: true});
navigate(from, { replace: true });
}
setUsername("");
setPassword("");
@@ -49,8 +51,27 @@ const Login: React.FC = () => {
<Stack className="grid-container" spacing={2}>
<img className="login-logo" src={hsbcLogo} alt="HSBC Logo" />
{/* <p ref={errRef} className={errMsg ? "errmsg" : "offscreen"} aria-live="assertive">{errMsg}</p> */}
<TextField className="username-input" id="outlined-basic" label="Username" variant="outlined" placeholder="Username" onChange={(event) => {setUsername(event.target.value);}}/>
<TextField className="password-input" id="outlined-basic" label="Password" variant="outlined" placeholder="Password" type="password" onChange={(event) => {setPassword(event.target.value);}}/>
<TextField
className="username-input"
id="outlined-basic"
label="Username"
variant="outlined"
placeholder="Username"
onChange={(event) => {
setUsername(event.target.value);
}}
/>
<TextField
className="password-input"
id="outlined-basic"
label="Password"
variant="outlined"
placeholder="Password"
type="password"
onChange={(event) => {
setPassword(event.target.value);
}}
/>
<Stack direction="row" justifyContent="space-between" spacing={2}>
<a className="register-btn" href="#">
<Typography sx={{ ml: 1, mb: 1 }}>Forgot your password?</Typography>