Skip to content

Commit

Permalink
Merge pull request #668 from meetfranz/fix/import-screen-toggles
Browse files Browse the repository at this point in the history
Fix import screen toggles
  • Loading branch information
adlk committed Feb 8, 2018
2 parents 38addc9 + 0a407db commit 1220e2c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/components/auth/Import.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ export default class Import extends Component {
intl: intlShape,
};

prepareForm() {
const { services } = this.props;

componentWillMount() {
const config = {
fields: {
import: [...services.filter(s => s.recipe).map(s => ({
add: {
default: true,
options: s,
import: [...this.props.services.filter(s => s.recipe).map(s => ({
fields: {
add: {
default: true,
options: s,
},
},
}))],
},
};

return new Form(config, this.context.intl);
this.form = new Form(config, this.context.intl);
}

submit(e) {
Expand All @@ -74,7 +74,6 @@ export default class Import extends Component {
}

render() {
this.form = this.prepareForm();
const { intl } = this.context;
const { services, isSubmitting, inviteRoute } = this.props;

Expand Down

0 comments on commit 1220e2c

Please sign in to comment.