Skip to content

Commit 1220e2c

Browse files
authored
Merge pull request #668 from meetfranz/fix/import-screen-toggles
Fix import screen toggles
2 parents 38addc9 + 0a407db commit 1220e2c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/components/auth/Import.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ export default class Import extends Component {
4141
intl: intlShape,
4242
};
4343

44-
prepareForm() {
45-
const { services } = this.props;
46-
44+
componentWillMount() {
4745
const config = {
4846
fields: {
49-
import: [...services.filter(s => s.recipe).map(s => ({
50-
add: {
51-
default: true,
52-
options: s,
47+
import: [...this.props.services.filter(s => s.recipe).map(s => ({
48+
fields: {
49+
add: {
50+
default: true,
51+
options: s,
52+
},
5353
},
5454
}))],
5555
},
5656
};
5757

58-
return new Form(config, this.context.intl);
58+
this.form = new Form(config, this.context.intl);
5959
}
6060

6161
submit(e) {
@@ -74,7 +74,6 @@ export default class Import extends Component {
7474
}
7575

7676
render() {
77-
this.form = this.prepareForm();
7877
const { intl } = this.context;
7978
const { services, isSubmitting, inviteRoute } = this.props;
8079

0 commit comments

Comments
 (0)