diff options
author | 2018-02-02 19:55:18 +0100 | |
---|---|---|
committer | 2018-02-02 19:55:18 +0100 | |
commit | abeea5bd26ce3bee9a0e1368f4934df035587bf5 (patch) | |
tree | 16222ed2fb9489fdbc03178ed6a42bb363fd887b /src/containers | |
parent | finished embedded invite functionality (diff) | |
download | ferdium-app-abeea5bd26ce3bee9a0e1368f4934df035587bf5.tar.gz ferdium-app-abeea5bd26ce3bee9a0e1368f4934df035587bf5.tar.zst ferdium-app-abeea5bd26ce3bee9a0e1368f4934df035587bf5.zip |
fix linting errors
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/InviteScreen.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/containers/settings/InviteScreen.js b/src/containers/settings/InviteScreen.js index 63e88765e..1947e79f0 100644 --- a/src/containers/settings/InviteScreen.js +++ b/src/containers/settings/InviteScreen.js | |||
@@ -1,9 +1,10 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { inject, observer } from 'mobx-react'; | 3 | import { inject, observer } from 'mobx-react'; |
4 | import { defineMessages, intlShape } from 'react-intl'; | ||
5 | |||
4 | import Invite from '../../components/auth/Invite'; | 6 | import Invite from '../../components/auth/Invite'; |
5 | import { gaPage } from '../../lib/analytics'; | 7 | import { gaPage } from '../../lib/analytics'; |
6 | import { defineMessages, intlShape } from 'react-intl'; | ||
7 | 8 | ||
8 | const messages = defineMessages({ | 9 | const messages = defineMessages({ |
9 | headline: { | 10 | headline: { |
@@ -22,13 +23,12 @@ export default class InviteScreen extends Component { | |||
22 | gaPage('Settings/Invite'); | 23 | gaPage('Settings/Invite'); |
23 | } | 24 | } |
24 | 25 | ||
25 | 26 | componentWillUnmount() { | |
26 | componentWillUnmount () { | 27 | this.props.stores.user.inviteRequest.reset(); |
27 | this.props.stores.user.inviteRequest.reset() | ||
28 | } | 28 | } |
29 | 29 | ||
30 | render() { | 30 | render() { |
31 | const { actions, location } = this.props; | 31 | const { actions } = this.props; |
32 | const { user } = this.props.stores; | 32 | const { user } = this.props.stores; |
33 | 33 | ||
34 | return ( | 34 | return ( |
@@ -40,8 +40,8 @@ export default class InviteScreen extends Component { | |||
40 | <Invite | 40 | <Invite |
41 | onSubmit={actions.user.invite} | 41 | onSubmit={actions.user.invite} |
42 | isLoadingInvite={user.inviteRequest.isExecuting} | 42 | isLoadingInvite={user.inviteRequest.isExecuting} |
43 | isInviteSuccessful={user.inviteRequest.wasExecuted && !user.inviteRequest.isError} | 43 | isInviteSuccessful={user.inviteRequest.wasExecuted && !user.inviteRequest.isError} |
44 | embed={true} | 44 | embed |
45 | /> | 45 | /> |
46 | </div> | 46 | </div> |
47 | </div> | 47 | </div> |
@@ -55,4 +55,9 @@ InviteScreen.wrappedComponent.propTypes = { | |||
55 | invite: PropTypes.func.isRequired, | 55 | invite: PropTypes.func.isRequired, |
56 | }).isRequired, | 56 | }).isRequired, |
57 | }).isRequired, | 57 | }).isRequired, |
58 | stores: PropTypes.shape({ | ||
59 | user: PropTypes.shape({ | ||
60 | inviteRequest: PropTypes.object, | ||
61 | }).isRequired, | ||
62 | }).isRequired, | ||
58 | }; | 63 | }; |