forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
38 lines (30 loc) · 1.02 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {connect} from 'react-redux';
import {bindActionCreators, Dispatch} from 'redux';
import {
getTeamsForUser,
getTeamMembersForUser,
removeUserFromTeam,
updateTeamMemberSchemeRoles,
} from 'mattermost-redux/actions/teams';
import {GenericAction} from 'mattermost-redux/types/actions';
import {GlobalState} from 'mattermost-redux/types/store';
import {getCurrentLocale} from 'selectors/i18n';
import TeamList from './team_list';
function mapStateToProps(state: GlobalState) {
return {
locale: getCurrentLocale(state),
};
}
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
return {
actions: bindActionCreators({
getTeamsData: getTeamsForUser,
getTeamMembersForUser,
removeUserFromTeam,
updateTeamMemberSchemeRoles,
}, dispatch),
};
}
export default connect(mapStateToProps, mapDispatchToProps)(TeamList);