aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth/Import.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/auth/Import.js')
-rw-r--r--src/components/auth/Import.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js
index 078244434..9ba14e768 100644
--- a/src/components/auth/Import.js
+++ b/src/components/auth/Import.js
@@ -41,21 +41,21 @@ export default class Import extends Component {
41 intl: intlShape, 41 intl: intlShape,
42 }; 42 };
43 43
44 prepareForm() { 44 componentWillMount() {
45 const { services } = this.props;
46
47 const config = { 45 const config = {
48 fields: { 46 fields: {
49 import: [...services.filter(s => s.recipe).map(s => ({ 47 import: [...this.props.services.filter(s => s.recipe).map(s => ({
50 add: { 48 fields: {
51 default: true, 49 add: {
52 options: s, 50 default: true,
51 options: s,
52 },
53 }, 53 },
54 }))], 54 }))],
55 }, 55 },
56 }; 56 };
57 57
58 return new Form(config, this.context.intl); 58 this.form = new Form(config, this.context.intl);
59 } 59 }
60 60
61 submit(e) { 61 submit(e) {
@@ -74,7 +74,6 @@ export default class Import extends Component {
74 } 74 }
75 75
76 render() { 76 render() {
77 this.form = this.prepareForm();
78 const { intl } = this.context; 77 const { intl } = this.context;
79 const { services, isSubmitting, inviteRoute } = this.props; 78 const { services, isSubmitting, inviteRoute } = this.props;
80 79