Guest User

Untitled

a guest
Apr 10th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. import React from "react";
  2. import { Link } from "react-router-dom";
  3.  
  4. const Login = ({ history, loginUser = f => f }) => {
  5. let _email, _password;
  6. const handleLogin = e => {
  7. e.preventDefault();
  8. loginUser(_email.value, _password.value);
  9. };
  10. return (
  11. <div id="main">
  12. <form id="login-form" action="" onSubmit={handleLogin} method="post">
  13. <h3 style={{ padding: 15 }}>Login Form</h3>
  14. <input ref={input => (_email = input)} style={styles.input} autoComplete="off" id="email-input" name="email" type="text" className="center-block" placeholder="email" />
  15. <input ref={input => (_password = input)} style={styles.input} autoComplete="off" id="password-input" name="password" type="password" className="center-block" placeholder="password" />
  16. <button type="submit" style={styles.button} className="landing-page-btn center-block text-center" id="email-login-btn" href="#facebook" >
  17. Login
  18. </button>
  19. </form>
  20. <Link style={styles.link} to="/register" >
  21. Register
  22. </Link>
  23. </div>
  24. );
  25. };
  26.  
  27. export default Login;
Add Comment
Please, Sign In to add comment