diff options
author | 2018-02-12 14:16:33 +0100 | |
---|---|---|
committer | 2018-02-12 14:16:33 +0100 | |
commit | 7a1872e64262a76f17ac231a47fd8f57cd5a13ac (patch) | |
tree | 29ed8aa4dfcb9b179f4fe47c30fb33cf78c2e2ce /src/stores | |
parent | Merge pull request #668 from meetfranz/fix/import-screen-toggles (diff) | |
parent | feat(App) Feature Invite Friends in Settings (diff) | |
download | ferdium-app-7a1872e64262a76f17ac231a47fd8f57cd5a13ac.tar.gz ferdium-app-7a1872e64262a76f17ac231a47fd8f57cd5a13ac.tar.zst ferdium-app-7a1872e64262a76f17ac231a47fd8f57cd5a13ac.zip |
Merge pull request #654 from meetfranz/feature/invite-button
Invite Button in Settings
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/UserStore.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js index 427b6454b..abec4df5d 100644 --- a/src/stores/UserStore.js +++ b/src/stores/UserStore.js | |||
@@ -161,13 +161,17 @@ export default class UserStore extends Store { | |||
161 | gaEvent('User', 'retrievePassword'); | 161 | gaEvent('User', 'retrievePassword'); |
162 | } | 162 | } |
163 | 163 | ||
164 | @action _invite({ invites }) { | 164 | @action async _invite({ invites }) { |
165 | const data = invites.filter(invite => invite.email !== ''); | 165 | const data = invites.filter(invite => invite.email !== ''); |
166 | 166 | ||
167 | this.inviteRequest.execute(data); | 167 | const response = await this.inviteRequest.execute(data)._promise; |
168 | 168 | ||
169 | // we do not wait for a server response before redirecting the user | 169 | this.actionStatus = response.status || []; |
170 | this.stores.router.push('/'); | 170 | |
171 | // we do not wait for a server response before redirecting the user ONLY DURING SIGNUP | ||
172 | if (this.stores.router.location.pathname.includes(this.INVITE_ROUTE)) { | ||
173 | this.stores.router.push('/'); | ||
174 | } | ||
171 | 175 | ||
172 | gaEvent('User', 'inviteUsers'); | 176 | gaEvent('User', 'inviteUsers'); |
173 | } | 177 | } |