Page login: modification titre
This commit is contained in:
parent
3aa8ab987b
commit
7d57d51f07
|
@ -8,6 +8,7 @@ export function LoginPage({ dispatch, isLoggedIn, history }) {
|
||||||
const [ formData, setFormData ] = useState({username: '', password: ''});
|
const [ formData, setFormData ] = useState({username: '', password: ''});
|
||||||
const onUsernameChange = evt => setFormData({ ...formData, username: evt.target.value });
|
const onUsernameChange = evt => setFormData({ ...formData, username: evt.target.value });
|
||||||
const onPasswordChange = evt => setFormData({ ...formData, password: evt.target.value });
|
const onPasswordChange = evt => setFormData({ ...formData, password: evt.target.value });
|
||||||
|
|
||||||
const onSubmit = evt => {
|
const onSubmit = evt => {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
const { username, password } = formData;
|
const { username, password } = formData;
|
||||||
|
@ -18,9 +19,8 @@ export function LoginPage({ dispatch, isLoggedIn, history }) {
|
||||||
if (isLoggedIn) history.push('/home');
|
if (isLoggedIn) history.push('/home');
|
||||||
}, [isLoggedIn]);
|
}, [isLoggedIn]);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page title="Login">
|
||||||
<div className="section">
|
<div className="section">
|
||||||
<div className="columns">
|
<div className="columns">
|
||||||
<div className="column is-4 is-offset-4">
|
<div className="column is-4 is-offset-4">
|
||||||
|
|
Loading…
Reference in New Issue