From d7cdcf082fab6c0cb7c2fe4bed821bd1a8000e69 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Mon, 8 Feb 2016 07:26:10 -0500
Subject: Convering client to react-router.

---
 web/react/components/sidebar_header.jsx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'web/react/components/sidebar_header.jsx')

diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx
index 45b0a5fc4..00d30948a 100644
--- a/web/react/components/sidebar_header.jsx
+++ b/web/react/components/sidebar_header.jsx
@@ -4,10 +4,8 @@
 import NavbarDropdown from './navbar_dropdown.jsx';
 import TutorialTip from './tutorial/tutorial_tip.jsx';
 
-import UserStore from '../stores/user_store.jsx';
 import PreferenceStore from '../stores/preference_store.jsx';
 
-import * as Utils from '../utils/utils.jsx';
 import Constants from '../utils/constants.jsx';
 
 import {FormattedHTMLMessage} from 'mm-intl';
@@ -34,7 +32,7 @@ export default class SidebarHeader extends React.Component {
         PreferenceStore.removeChangeListener(this.onPreferenceChange);
     }
     getStateFromStores() {
-        const tutorialStep = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 999);
+        const tutorialStep = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, this.props.currentUser.id, 999);
 
         return {showTutorialTip: tutorialStep === TutorialSteps.MENU_POPOVER};
     }
@@ -77,7 +75,7 @@ export default class SidebarHeader extends React.Component {
         );
     }
     render() {
-        var me = UserStore.getCurrentUser();
+        var me = this.props.currentUser;
         var profilePicture = null;
 
         if (!me) {
@@ -88,7 +86,7 @@ export default class SidebarHeader extends React.Component {
             profilePicture = (
                 <img
                     className='user__picture'
-                    src={'/api/v1/users/' + me.id + '/image?time=' + me.update_at + '&' + Utils.getSessionIndex()}
+                    src={'/api/v1/users/' + me.id + '/image?time=' + me.update_at}
                 />
             );
         }
@@ -124,6 +122,7 @@ export default class SidebarHeader extends React.Component {
                     teamType={this.props.teamType}
                     teamDisplayName={this.props.teamDisplayName}
                     teamName={this.props.teamName}
+                    currentUser={this.props.currentUser}
                 />
             </div>
         );
@@ -131,11 +130,12 @@ export default class SidebarHeader extends React.Component {
 }
 
 SidebarHeader.defaultProps = {
-    teamDisplayName: global.window.mm_config.SiteName,
+    teamDisplayName: '',
     teamType: ''
 };
 SidebarHeader.propTypes = {
     teamDisplayName: React.PropTypes.string,
     teamName: React.PropTypes.string,
-    teamType: React.PropTypes.string
+    teamType: React.PropTypes.string,
+    currentUser: React.PropTypes.object
 };
-- 
cgit v1.2.3-1-g7c22

