From eceb56dd58fe5ba95c98f10ba9c49a7df8c16c66 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Mon, 2 Nov 2015 12:50:15 -0800
Subject: PLT-885 allow single select of stats page

---
 web/react/components/admin_console/admin_sidebar.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'web/react/components/admin_console/admin_sidebar.jsx')

diff --git a/web/react/components/admin_console/admin_sidebar.jsx b/web/react/components/admin_console/admin_sidebar.jsx
index f2fb1c96d..0d52ae347 100644
--- a/web/react/components/admin_console/admin_sidebar.jsx
+++ b/web/react/components/admin_console/admin_sidebar.jsx
@@ -3,6 +3,7 @@
 
 var AdminSidebarHeader = require('./admin_sidebar_header.jsx');
 var SelectTeamModal = require('./select_team_modal.jsx');
+var Utils = require('../../utils/utils.jsx');
 
 export default class AdminSidebar extends React.Component {
     constructor(props) {
@@ -24,12 +25,13 @@ export default class AdminSidebar extends React.Component {
     handleClick(name, teamId, e) {
         e.preventDefault();
         this.props.selectTab(name, teamId);
-        history.pushState({name, teamId}, null, `/admin_console/${name}/${teamId || ''}`);
+        var tokenIndex = Utils.getUrlParameter('session_token_index');
+        history.pushState({name, teamId}, null, `/admin_console/${name}/${teamId || ''}?session_token_index=${tokenIndex}`);
     }
 
     isSelected(name, teamId) {
         if (this.props.selected === name) {
-            if (name === 'team_users') {
+            if (name === 'team_users' || name === 'team_analytics') {
                 if (this.props.selectedTeam != null && this.props.selectedTeam === teamId) {
                     return 'active';
                 }
-- 
cgit v1.2.3-1-g7c22

