diff options
author | 2018-02-08 20:34:44 +0100 | |
---|---|---|
committer | 2018-02-08 20:34:44 +0100 | |
commit | 1220e2c935d63d2be92c9b2a77f5941d6efe45d6 (patch) | |
tree | 1aa53c7b8617a977171bda894ae687c28b0e2b74 /src/components | |
parent | Merge pull request #631 from meetfranz/move-subscription-folders (diff) | |
parent | [MINOR] remove commented code (diff) | |
download | ferdium-app-1220e2c935d63d2be92c9b2a77f5941d6efe45d6.tar.gz ferdium-app-1220e2c935d63d2be92c9b2a77f5941d6efe45d6.tar.zst ferdium-app-1220e2c935d63d2be92c9b2a77f5941d6efe45d6.zip |
Merge pull request #668 from meetfranz/fix/import-screen-toggles
Fix import screen toggles
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/auth/Import.js | 17 |
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 | ||