Skip to content

Commit

Permalink
fixed typo #110
Browse files Browse the repository at this point in the history
  • Loading branch information
KalTang committed Apr 16, 2021
1 parent 36dd503 commit 607f8ec
Showing 1 changed file with 67 additions and 61 deletions.
128 changes: 67 additions & 61 deletions client/src/views/login/LoginScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,78 @@ import LockIcon from '@material-ui/icons/Lock';
import EmailIcon from '@material-ui/icons/Email';

const Login = ({ handleLogin }) => {
const [user, setUser] = useState({ email: '', password: '' });
const [user, setUser] = useState({ email: '', password: '' });

const submitForm = (e) => {
e.preventDefault();
handleLogin(user);
};
const submitForm = (e) => {
e.preventDefault();
handleLogin(user);
};

return (
<Container>
<div className='flex-container'>
<div id='login-pg'>
<form onSubmit={submitForm} className='login-form'>
<LandingLogo />
<h1 className='login-title'>Blockwatch</h1>
<p className='login-tagline'>Building safe communities</p>
return (
<Container>
<div className="flex-container">
<div id="login-pg">
<form onSubmit={submitForm} className="login-form">
<LandingLogo />
<h1 className="login-title">blockwatch</h1>
<p className="login-tagline">
Building safe communities
</p>

<TextField
required
variant='outlined'
label='Email'
placeholder='Email'
className='login-form-input'
InputProps={{
startAdornment: (
<InputAdornment position='start'>
<EmailIcon />
</InputAdornment>
),
}}
onChange={(e) => {
setUser({ ...user, email: e.target.value });
}}
/>
<TextField
required
variant="outlined"
label="Email"
placeholder="Email"
className="login-form-input"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<EmailIcon />
</InputAdornment>
),
}}
onChange={(e) => {
setUser({ ...user, email: e.target.value });
}}
/>

<TextField
required={true}
label='password'
variant='outlined'
placeholder='password'
className='login-form-input'
type='password'
id='password'
InputProps={{
startAdornment: (
<InputAdornment position='start'>
<LockIcon />
</InputAdornment>
),
}}
onChange={(e) =>
setUser({
...user,
password: e.target.value,
})
}
/>
<button type='submit' id='Register' className='login-button'>
Login
</button>
<TextField
required={true}
label="password"
variant="outlined"
placeholder="password"
className="login-form-input"
type="password"
id="password"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<LockIcon />
</InputAdornment>
),
}}
onChange={(e) =>
setUser({
...user,
password: e.target.value,
})
}
/>
<button
type="submit"
id="Register"
className="login-button"
>
Login
</button>

<Link to='/register'>Sign Up here</Link>
</form>
</div>
</div>
</Container>
);
<Link to="/register">Sign Up here</Link>
</form>
</div>
</div>
</Container>
);
};

export default Login;

0 comments on commit 607f8ec

Please sign in to comment.