summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_invite_modal
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-04-26 15:49:15 -0400
committerGitHub <noreply@github.com>2017-04-26 15:49:15 -0400
commit7307156c49b194c4afd946cd9e57715d45b5b21d (patch)
tree1601a0026859ff40e631b4aee9632b022ed6f40f /webapp/components/channel_invite_modal
parent1fef5bf5fe37f161959fbef5d53deccf0168cced (diff)
downloadchat-7307156c49b194c4afd946cd9e57715d45b5b21d.tar.gz
chat-7307156c49b194c4afd946cd9e57715d45b5b21d.tar.bz2
chat-7307156c49b194c4afd946cd9e57715d45b5b21d.zip
PLT-6213 Move team store and actions over to use redux (#6222)
* Move team store and actions over to user redux * Fix JS error when inviting by email
Diffstat (limited to 'webapp/components/channel_invite_modal')
-rw-r--r--webapp/components/channel_invite_modal/channel_invite_modal.jsx6
-rw-r--r--webapp/components/channel_invite_modal/index.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/webapp/components/channel_invite_modal/channel_invite_modal.jsx b/webapp/components/channel_invite_modal/channel_invite_modal.jsx
index 847af16f6..4be0d23e5 100644
--- a/webapp/components/channel_invite_modal/channel_invite_modal.jsx
+++ b/webapp/components/channel_invite_modal/channel_invite_modal.jsx
@@ -11,7 +11,6 @@ import TeamStore from 'stores/team_store.jsx';
import {searchUsers} from 'actions/user_actions.jsx';
-import * as AsyncClient from 'utils/async_client.jsx';
import * as UserAgent from 'utils/user_agent.jsx';
import Constants from 'utils/constants.jsx';
@@ -29,7 +28,8 @@ export default class ChannelInviteModal extends React.Component {
onHide: React.PropTypes.func.isRequired,
channel: React.PropTypes.object.isRequired,
actions: React.PropTypes.shape({
- getProfilesNotInChannel: React.PropTypes.func.isRequired
+ getProfilesNotInChannel: React.PropTypes.func.isRequired,
+ getTeamStats: React.PropTypes.func.isRequired
}).isRequired
}
@@ -64,7 +64,7 @@ export default class ChannelInviteModal extends React.Component {
UserStore.addStatusesChangeListener(this.onStatusChange);
this.props.actions.getProfilesNotInChannel(TeamStore.getCurrentId(), this.props.channel.id, 0);
- AsyncClient.getTeamStats(TeamStore.getCurrentId());
+ this.props.actions.getTeamStats(TeamStore.getCurrentId());
}
componentWillUnmount() {
diff --git a/webapp/components/channel_invite_modal/index.js b/webapp/components/channel_invite_modal/index.js
index c8bdb54f5..a89a94a4c 100644
--- a/webapp/components/channel_invite_modal/index.js
+++ b/webapp/components/channel_invite_modal/index.js
@@ -4,6 +4,7 @@
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getProfilesNotInChannel} from 'mattermost-redux/actions/users';
+import {getTeamStats} from 'mattermost-redux/actions/teams';
import ChannelInviteModal from './channel_invite_modal.jsx';
@@ -16,7 +17,8 @@ function mapStateToProps(state, ownProps) {
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
- getProfilesNotInChannel
+ getProfilesNotInChannel,
+ getTeamStats
}, dispatch)
};
}