diff options
author | 2018-02-02 11:01:38 +0100 | |
---|---|---|
committer | 2018-02-02 11:01:38 +0100 | |
commit | f74d47acb7ee470e24245667c9195604faa66a20 (patch) | |
tree | 1f441a5acbf1e8661f47a8cf5ca8bc30493d5724 /src/containers/settings/InviteScreen.js | |
parent | [WIP] started work on infobox (diff) | |
download | ferdium-app-f74d47acb7ee470e24245667c9195604faa66a20.tar.gz ferdium-app-f74d47acb7ee470e24245667c9195604faa66a20.tar.zst ferdium-app-f74d47acb7ee470e24245667c9195604faa66a20.zip |
got server callback and infobox working
Diffstat (limited to 'src/containers/settings/InviteScreen.js')
-rw-r--r-- | src/containers/settings/InviteScreen.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/containers/settings/InviteScreen.js b/src/containers/settings/InviteScreen.js index 923f08069..a1170bfec 100644 --- a/src/containers/settings/InviteScreen.js +++ b/src/containers/settings/InviteScreen.js | |||
@@ -22,11 +22,17 @@ export default class InviteScreen extends Component { | |||
22 | gaPage('Settings/Invite'); | 22 | gaPage('Settings/Invite'); |
23 | } | 23 | } |
24 | 24 | ||
25 | |||
26 | componentWillUnmount () { | ||
27 | this.props.stores.user.inviteRequest.reset() | ||
28 | } | ||
29 | |||
25 | render() { | 30 | render() { |
26 | const { | 31 | const { actions, location } = this.props; |
27 | actions, | 32 | const { user } = this.props.stores; |
28 | location, | 33 | |
29 | } = this.props; | 34 | const isLoadingInvite = user.inviteRequest.isExecuting; |
35 | const isInviteSuccessful = user.inviteRequest.wasExecuted && !user.inviteRequest.isError; | ||
30 | 36 | ||
31 | return ( | 37 | return ( |
32 | <div className="settings__main"> | 38 | <div className="settings__main"> |
@@ -36,6 +42,9 @@ export default class InviteScreen extends Component { | |||
36 | <div className="settings__body invite__form"> | 42 | <div className="settings__body invite__form"> |
37 | <Invite | 43 | <Invite |
38 | onSubmit={actions.user.invite} | 44 | onSubmit={actions.user.invite} |
45 | // status={user.actionStatus} // not needed | ||
46 | isLoadingInvite={user.inviteRequest.isExecuting} | ||
47 | isInviteSuccessful={user.inviteRequest.wasExecuted && !user.inviteRequest.isError} | ||
39 | from={location.query.from} | 48 | from={location.query.from} |
40 | embed={true} | 49 | embed={true} |
41 | success={location.query.success} | 50 | success={location.query.success} |