diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js index b19c5ebfd5..0b3281d683 100644 --- a/src/components/structures/BottomLeftMenu.js +++ b/src/components/structures/BottomLeftMenu.js @@ -35,9 +35,14 @@ module.exports = React.createClass({ homeHover: false, peopleHover : false, settingsHover : false, + teamToken: null, }); }, + componentWillMount: function() { + this.teamToken = window.localStorage.getItem('mx_team_token'); + }, + // Room events onDirectoryClick: function() { dis.dispatch({ action: 'view_room_directory' }); @@ -114,7 +119,7 @@ module.exports = React.createClass({ var TintableSvg = sdk.getComponent('elements.TintableSvg'); var homeButton; - if (window.localStorage.getItem('mx_team_token')) { + if (this.state.teamToken) { homeButton = (