-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathSignUpForm.js
More file actions
33 lines (28 loc) · 836 Bytes
/
SignUpForm.js
File metadata and controls
33 lines (28 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React, { Component } from 'react'
import {reduxForm, Field} from 'redux-form'
import ErrorField from '../common/ErrorField'
import {validate} from './utils'
class SignUpForm extends Component {
static propTypes = {
};
render() {
return (
<div>
<h3>Sign In</h3>
<form onSubmit={this.props.handleSubmit}>
<div>
email: <Field name='email' component={ErrorField}/>
</div>
<div>
password: <Field name='password' component={ErrorField} type='password'/>
</div>
<input type='submit' />
</form>
</div>
)
}
}
export default reduxForm({
form: 'auth',
validate
})(SignUpForm)