2019-06-24 13:35:01 -04:00
|
|
|
const bindAll = require('lodash.bindall');
|
|
|
|
const defaults = require('lodash.defaultsdeep');
|
2019-06-24 11:31:16 -04:00
|
|
|
const PropTypes = require('prop-types');
|
|
|
|
const React = require('react');
|
|
|
|
|
|
|
|
const injectIntl = require('../../lib/intl.jsx').injectIntl;
|
|
|
|
const intlShape = require('../../lib/intl.jsx').intlShape;
|
|
|
|
|
2019-06-24 13:35:01 -04:00
|
|
|
const JoinFlowSteps = require('../registration/join-flow-steps.jsx');
|
|
|
|
|
2019-06-24 11:31:16 -04:00
|
|
|
/*
|
|
|
|
eslint-disable react/prefer-stateless-function, react/no-unused-prop-types, no-useless-constructor
|
|
|
|
*/
|
|
|
|
class JoinFlow extends React.Component {
|
|
|
|
constructor (props) {
|
|
|
|
super(props);
|
2019-06-24 13:35:01 -04:00
|
|
|
bindAll(this, [
|
|
|
|
'handleAdvanceStep'
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
handleAdvanceStep (formData) {
|
|
|
|
formData = formData || {};
|
|
|
|
this.setState({
|
|
|
|
step: this.state.step + 1,
|
|
|
|
formData: defaults({}, formData, this.state.formData)
|
|
|
|
});
|
2019-06-24 11:31:16 -04:00
|
|
|
}
|
|
|
|
render () {
|
|
|
|
return (
|
2019-06-24 13:35:01 -04:00
|
|
|
<React.Fragment>
|
2019-06-25 12:04:41 -04:00
|
|
|
<JoinFlowSteps.UsernameStep />
|
2019-06-24 13:35:01 -04:00
|
|
|
</React.Fragment>
|
2019-06-24 11:31:16 -04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
JoinFlow.propTypes = {
|
|
|
|
intl: intlShape,
|
|
|
|
onCompleteRegistration: PropTypes.func
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = injectIntl(JoinFlow);
|
|
|
|
|
|
|
|
/*
|
|
|
|
eslint-enable
|
|
|
|
*/
|