diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-06-14 08:56:56 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-06-14 08:56:56 -0400 |
commit | 1138dd67705829a6af0d6c610cf3dbe09082187c (patch) | |
tree | 23bdc3db76221bead172be1c51eb52a4987636f1 /webapp/components/analytics/team_analytics/index.js | |
parent | 40efd8367a85e3333e9b7cc45c390259d412088c (diff) | |
download | chat-1138dd67705829a6af0d6c610cf3dbe09082187c.tar.gz chat-1138dd67705829a6af0d6c610cf3dbe09082187c.tar.bz2 chat-1138dd67705829a6af0d6c610cf3dbe09082187c.zip |
PLT-6657 Move system console to use v4 endpoints and redux (#6572)
* Move system console to use v4 endpoints and redux
* Rename logs dir to get past gitignore
* Fix test email
* Update brand unit test
* Updates per feedback
Diffstat (limited to 'webapp/components/analytics/team_analytics/index.js')
-rw-r--r-- | webapp/components/analytics/team_analytics/index.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webapp/components/analytics/team_analytics/index.js b/webapp/components/analytics/team_analytics/index.js index 270967a1b..0620a8fdb 100644 --- a/webapp/components/analytics/team_analytics/index.js +++ b/webapp/components/analytics/team_analytics/index.js @@ -5,10 +5,20 @@ import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {getTeams} from 'mattermost-redux/actions/teams'; +import {getTeamsList} from 'mattermost-redux/selectors/entities/teams'; +import BrowserStore from 'stores/browser_store.jsx'; + import TeamAnalytics from './team_analytics.jsx'; +const LAST_ANALYTICS_TEAM = 'last_analytics_team'; + function mapStateToProps(state, ownProps) { + const teams = getTeamsList(state); + const teamId = BrowserStore.getGlobalItem(LAST_ANALYTICS_TEAM, teams.length > 0 ? teams[0].id : ''); + return { + initialTeam: state.entities.teams.teams[teamId], + teams, ...ownProps }; } |