From 7307156c49b194c4afd946cd9e57715d45b5b21d Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 26 Apr 2017 15:49:15 -0400 Subject: 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 --- webapp/components/channel_invite_modal/channel_invite_modal.jsx | 6 +++--- webapp/components/channel_invite_modal/index.js | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'webapp/components/channel_invite_modal') 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) }; } -- cgit v1.2.3-1-g7c22