Guest User

Untitled

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