rename RegistrationError to RegistrationErrorStep

This commit is contained in:
Ben Wheeler 2019-08-30 16:20:05 -04:00
parent f7a70475e2
commit 3809d83c36
2 changed files with 6 additions and 8 deletions

View file

@ -16,7 +16,7 @@ const GenderStep = require('./gender-step.jsx');
const CountryStep = require('./country-step.jsx');
const EmailStep = require('./email-step.jsx');
const WelcomeStep = require('./welcome-step.jsx');
const RegistrationError = require('./registration-error.jsx');
const RegistrationErrorStep = require('./registration-error-step.jsx');
/*
eslint-disable react/prefer-stateless-function, react/no-unused-prop-types, no-useless-constructor
@ -128,7 +128,7 @@ class JoinFlow extends React.Component {
return (
<React.Fragment>
{this.state.registrationError ? (
<RegistrationError
<RegistrationErrorStep
errorMsg={this.state.registrationError}
/* eslint-disable react/jsx-no-bind */
onTryAgain={() => this.handleRegister(this.state.formData)}

View file

@ -7,14 +7,12 @@ const JoinFlowStep = require('./join-flow-step.jsx');
require('./join-flow-steps.scss');
class RegistrationError extends React.Component {
class RegistrationErrorStep extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleSubmit'
]);
this.state = {
};
}
handleSubmit (e) {
e.preventDefault(); // prevent page reload
@ -33,12 +31,12 @@ class RegistrationError extends React.Component {
}
}
RegistrationError.propTypes = {
RegistrationErrorStep.propTypes = {
errorMsg: PropTypes.string,
intl: intlShape,
onTryAgain: PropTypes.func
};
const IntlRegistrationError = injectIntl(RegistrationError);
const IntlRegistrationErrorStep = injectIntl(RegistrationErrorStep);
module.exports = IntlRegistrationError;
module.exports = IntlRegistrationErrorStep;