diff options
author | 2018-02-08 12:21:31 +0100 | |
---|---|---|
committer | 2018-02-08 12:21:31 +0100 | |
commit | 2a25f02d74876d25dfacd3af45a8919122fa8a6a (patch) | |
tree | f7f3bf6a9588ea331a0c3af59c693c94d4033793 /src/components/auth/Invite.js | |
parent | [MINOR] ADD blank line (diff) | |
download | ferdium-app-2a25f02d74876d25dfacd3af45a8919122fa8a6a.tar.gz ferdium-app-2a25f02d74876d25dfacd3af45a8919122fa8a6a.tar.zst ferdium-app-2a25f02d74876d25dfacd3af45a8919122fa8a6a.zip |
REMOVE presentational stuff from smart container
Diffstat (limited to 'src/components/auth/Invite.js')
-rw-r--r-- | src/components/auth/Invite.js | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js index 2dcce7f83..dfe6a00b7 100644 --- a/src/components/auth/Invite.js +++ b/src/components/auth/Invite.js | |||
@@ -13,6 +13,10 @@ import Input from '../ui/Input'; | |||
13 | import Button from '../ui/Button'; | 13 | import Button from '../ui/Button'; |
14 | 14 | ||
15 | const messages = defineMessages({ | 15 | const messages = defineMessages({ |
16 | settingsHeadline: { | ||
17 | id: 'settings.invite.headline', | ||
18 | defaultMessage: '!!!Invite Friends', | ||
19 | }, | ||
16 | headline: { | 20 | headline: { |
17 | id: 'invite.headline.friends', | 21 | id: 'invite.headline.friends', |
18 | defaultMessage: '!!!Invite 3 of your friends or colleagues', | 22 | defaultMessage: '!!!Invite 3 of your friends or colleagues', |
@@ -117,17 +121,19 @@ export default class Invite extends Component { | |||
117 | 'invite__embed--button': embed, | 121 | 'invite__embed--button': embed, |
118 | }); | 122 | }); |
119 | 123 | ||
120 | return ( | 124 | const renderForm = ( |
121 | <div> | 125 | <div> |
122 | {this.state.showSuccessInfo && isInviteSuccessful && (<Appear> | 126 | {this.state.showSuccessInfo && isInviteSuccessful && ( |
123 | <Infobox | 127 | <Appear> |
124 | type="success" | 128 | <Infobox |
125 | icon="checkbox-marked-circle-outline" | 129 | type="success" |
126 | dismissable | 130 | icon="checkbox-marked-circle-outline" |
127 | > | 131 | dismissable |
128 | {intl.formatMessage(messages.inviteSuccessInfo)} | 132 | > |
129 | </Infobox> | 133 | {intl.formatMessage(messages.inviteSuccessInfo)} |
130 | </Appear>)} | 134 | </Infobox> |
135 | </Appear> | ||
136 | )} | ||
131 | 137 | ||
132 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> | 138 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> |
133 | {!embed && (<img | 139 | {!embed && (<img |
@@ -162,5 +168,16 @@ export default class Invite extends Component { | |||
162 | </form> | 168 | </form> |
163 | </div> | 169 | </div> |
164 | ); | 170 | ); |
171 | |||
172 | return ( | ||
173 | <div className={!embed ? 'auth__container auth__container--signup' : 'settings__main'}> | ||
174 | {embed && ( | ||
175 | <div className="settings__header"> | ||
176 | <h1>{this.context.intl.formatMessage(messages.settingsHeadline)}</h1> | ||
177 | </div> | ||
178 | )} | ||
179 | {!embed ? <div>{renderForm}</div> : <div className="settings__body invite__form">{renderForm}</div>} | ||
180 | </div> | ||
181 | ); | ||
165 | } | 182 | } |
166 | } | 183 | } |