From 801b2fee9ab28d89aefeeb2d7406cf17eae9117a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 5 Sep 2018 16:34:44 +1200 Subject: Implement logout button --- modern/src/LoginPage.js | 92 ++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 44 deletions(-) (limited to 'modern/src/LoginPage.js') diff --git a/modern/src/LoginPage.js b/modern/src/LoginPage.js index 3ba6bacb..ac4a51ce 100644 --- a/modern/src/LoginPage.js +++ b/modern/src/LoginPage.js @@ -65,7 +65,8 @@ class LoginPage extends Component { // TODO implement registration } - handleLogin() { + handleLogin(event) { + event.preventDefault(); const { email, password } = this.state; fetch("/api/session", { method: "POST", @@ -91,49 +92,52 @@ class LoginPage extends Component { Traccar - - Email - - { failed && Invalid username or password } - - - - Password - - - -
- - - - - -
+
+ + + Email + + { failed && Invalid username or password } + + + + Password + + + +
+ + + + + +
+ +
-- cgit v1.2.3