SecurityForm: Break ChangeEmailForm into separate component
This commit is contained in:
parent
f99d1300c2
commit
e972cfc191
1 changed files with 42 additions and 29 deletions
|
@ -20,10 +20,25 @@ const messages = defineMessages({
|
|||
updateEmailFail: { id: 'security.update_email.fail', defaultMessage: 'Update email failed.' },
|
||||
});
|
||||
|
||||
export default @connect()
|
||||
@injectIntl
|
||||
export default @injectIntl
|
||||
class SecurityForm extends ImmutablePureComponent {
|
||||
|
||||
render() {
|
||||
const { intl } = this.props;
|
||||
|
||||
return (
|
||||
<Column icon='lock' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
||||
<ChangeEmailForm />
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@connect()
|
||||
@injectIntl
|
||||
class ChangeEmailForm extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
email: PropTypes.string,
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
|
@ -59,7 +74,6 @@ class SecurityForm extends ImmutablePureComponent {
|
|||
const { intl } = this.props;
|
||||
|
||||
return (
|
||||
<Column icon='lock' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
||||
<SimpleForm onSubmit={this.handleSubmit}>
|
||||
<fieldset disabled={this.state.isLoading}>
|
||||
<FieldsGroup>
|
||||
|
@ -85,7 +99,6 @@ class SecurityForm extends ImmutablePureComponent {
|
|||
</FieldsGroup>
|
||||
</fieldset>
|
||||
</SimpleForm>
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue