From 7d57d51f07dee10d340343e25a55dd2340beb4a3 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 19 Feb 2020 12:24:34 +0100 Subject: [PATCH] Page login: modification titre --- frontend/src/pages/login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/login.js b/frontend/src/pages/login.js index b4149c6..99c0b4e 100644 --- a/frontend/src/pages/login.js +++ b/frontend/src/pages/login.js @@ -8,6 +8,7 @@ export function LoginPage({ dispatch, isLoggedIn, history }) { const [ formData, setFormData ] = useState({username: '', password: ''}); const onUsernameChange = evt => setFormData({ ...formData, username: evt.target.value }); const onPasswordChange = evt => setFormData({ ...formData, password: evt.target.value }); + const onSubmit = evt => { evt.preventDefault(); const { username, password } = formData; @@ -18,9 +19,8 @@ export function LoginPage({ dispatch, isLoggedIn, history }) { if (isLoggedIn) history.push('/home'); }, [isLoggedIn]); - return ( - +