mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Set team token in state on mount
This commit is contained in:
parent
d490bd8638
commit
35bc384c51
@ -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 = (
|
||||
<div className="mx_BottomLeftMenu_homePage" onClick={ this.onHomeClick } onMouseEnter={ this.onHomeMouseEnter } onMouseLeave={ this.onHomeMouseLeave } >
|
||||
<TintableSvg src="img/icons-home.svg" width="25" height="25" />
|
||||
|
Loading…
Reference in New Issue
Block a user