AllenYuan

registration - render and export

Apr 26th, 2020
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   render() {
  2.     // grab current inputs
  3.     const {email, username, password} = this.props;
  4.  
  5.     return (
  6.       <div className="auth-page">
  7.         <div className="container page">
  8.           <div className="row">
  9.             <div className="col-md-6 offset-md-3 col-xs-12">
  10.               <h1 className="text-xs-center">Sign Up</h1>
  11.               <p className="text-xs-center">
  12.                 <Link to="login">Have an account?</Link>
  13.               </p>
  14.               <ListErrors errors={this.props.errors} />
  15.               <form onSubmit={this.submitForm(username, email, password)}>
  16.                 <fieldset>
  17.                   <fieldset className="form-group">
  18.                     <input
  19.                       className="form-control form-control-lg"
  20.                       type="text"
  21.                       placeholder="Username"
  22.                       value={this.props.username}
  23.                       onChange={this.changeUsername}
  24.                     />
  25.                   </fieldset>
  26.                   <fieldset className="form-group">
  27.                     <input
  28.                       className="form-control form-control-lg"
  29.                       type="email"
  30.                       placeholder="Email"
  31.                       value={this.props.email}
  32.                       onChange={this.changeEmail}
  33.                     />
  34.                   </fieldset>
  35.                   <fieldset className="form-group">
  36.                     <input
  37.                       className="form-control form-control-lg"
  38.                       type="password"
  39.                       placeholder="Password"
  40.                       value={this.props.password}
  41.                       onChange={this.changePassword}
  42.                     />
  43.                   </fieldset>
  44.                   <button
  45.                     className="btn btn-lg btn-primary pull-xs-right"
  46.                     type="submit"
  47.                     disabled={this.props.inProgress}
  48.                   >
  49.                     Sign in
  50.                   </button>
  51.                 </fieldset>
  52.               </form>
  53.             </div>
  54.           </div>
  55.         </div>
  56.       </div>
  57.     );
  58.   }
  59. }
  60.  
  61. export default connect(mapStateToProps, mapDispatchToProps)(Register);
Advertisement
Add Comment
Please, Sign In to add comment