Merge pull request #334 from netlify/fix-log-out
Fix logout for Firefox
This commit is contained in:
commit
acbd4cb911
@ -45,12 +45,6 @@ export default class AppHeader extends React.Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
handleRightIconClick = () => {
|
|
||||||
this.setState({
|
|
||||||
userMenuActive: !this.state.userMenuActive,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
user,
|
user,
|
||||||
@ -60,8 +54,6 @@ export default class AppHeader extends React.Component {
|
|||||||
onLogoutClick,
|
onLogoutClick,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const { userMenuActive } = this.state;
|
|
||||||
|
|
||||||
const avatarStyle = {
|
const avatarStyle = {
|
||||||
backgroundColor: `#${ stringToRGB(user.get("name")) }`,
|
backgroundColor: `#${ stringToRGB(user.get("name")) }`,
|
||||||
};
|
};
|
||||||
@ -71,22 +63,6 @@ export default class AppHeader extends React.Component {
|
|||||||
fixed
|
fixed
|
||||||
theme={styles}
|
theme={styles}
|
||||||
leftIcon="menu"
|
leftIcon="menu"
|
||||||
rightIcon={
|
|
||||||
<div>
|
|
||||||
<Avatar
|
|
||||||
style={avatarStyle}
|
|
||||||
title={user.get("name")}
|
|
||||||
image={user.get("avatar_url")}
|
|
||||||
/>
|
|
||||||
<Menu
|
|
||||||
active={userMenuActive}
|
|
||||||
position="topRight"
|
|
||||||
onHide={this.handleRightIconClick}
|
|
||||||
>
|
|
||||||
<MenuItem onClick={onLogoutClick}>Log out</MenuItem>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
onLeftIconClick={toggleDrawer}
|
onLeftIconClick={toggleDrawer}
|
||||||
onRightIconClick={this.handleRightIconClick}
|
onRightIconClick={this.handleRightIconClick}
|
||||||
>
|
>
|
||||||
@ -111,6 +87,10 @@ export default class AppHeader extends React.Component {
|
|||||||
}
|
}
|
||||||
</IconMenu>
|
</IconMenu>
|
||||||
<FindBar runCommand={runCommand} />
|
<FindBar runCommand={runCommand} />
|
||||||
|
<Avatar style={avatarStyle} title={user.get("name")} image={user.get("avatar_url")} />
|
||||||
|
<IconMenu icon="settings" position="topRight" theme={styles}>
|
||||||
|
<MenuItem onClick={onLogoutClick} value="log out" caption="Log Out" />
|
||||||
|
</IconMenu>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user