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.
27 lines
774 B
27 lines
774 B
import { connect } from 'react-redux'
|
|
import { getStep } from 'src/selectors/registration'
|
|
import { initForm, initField } from 'src/actions/forms'
|
|
import { AppState, AppThunkDispatch } from 'src/types'
|
|
|
|
import Register from './register'
|
|
|
|
const mapStateToProps = (state: AppState) => ({
|
|
step: getStep(state),
|
|
})
|
|
|
|
const mapDispatchToProps = (dispatch: AppThunkDispatch) => ({
|
|
initForm: () => {
|
|
dispatch(initForm())
|
|
dispatch(initField('group-name'))
|
|
dispatch(initField('group-registration'))
|
|
dispatch(initField('user-id'))
|
|
dispatch(initField('user-name'))
|
|
dispatch(initField('user-email'))
|
|
dispatch(initField('password'))
|
|
},
|
|
})
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(Register)
|