You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
574 B
24 lines
574 B
import { Dispatch } from 'redux'
|
|
import { connect } from 'react-redux'
|
|
|
|
import { initForm, initField } from 'src/actions/forms'
|
|
import { AppState } from 'src/types'
|
|
|
|
import RegisterForm from './register-form'
|
|
|
|
const mapStateToProps = (state: AppState) => ({
|
|
})
|
|
|
|
const mapDispatchToProps = (dispatch: Dispatch) => ({
|
|
initForm: () => {
|
|
dispatch(initForm())
|
|
dispatch(initField('username'))
|
|
dispatch(initField('name'))
|
|
dispatch(initField('email'))
|
|
}
|
|
})
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(RegisterForm)
|