Commit 41d9b1f5 authored by Technoboy10's avatar Technoboy10

use classNames before return

parent 52d834c3
...@@ -178,6 +178,10 @@ var Navigation = React.createClass({ ...@@ -178,6 +178,10 @@ var Navigation = React.createClass({
'message-count': true, 'message-count': true,
'show': this.state.unreadMessageCount > 0 'show': this.state.unreadMessageCount > 0
}); });
var dropdownClasses = classNames({
'user-info': true,
'open': this.state.accountNavOpen
});
var formatMessage = this.props.intl.formatMessage; var formatMessage = this.props.intl.formatMessage;
var createLink = this.props.session.session.user ? '/projects/editor/' : '/projects/editor/?tip_bar=home'; var createLink = this.props.session.session.user ? '/projects/editor/' : '/projects/editor/?tip_bar=home';
return ( return (
...@@ -241,7 +245,7 @@ var Navigation = React.createClass({ ...@@ -241,7 +245,7 @@ var Navigation = React.createClass({
</a> </a>
</li>, </li>,
<li className="link right account-nav" key="account-nav"> <li className="link right account-nav" key="account-nav">
<a className={this.state.accountNavOpen ? 'user-info open' : 'user-info'} <a className={dropdownClasses}
href="#" onClick={this.handleAccountNavClick}> href="#" onClick={this.handleAccountNavClick}>
<Avatar src={this.props.session.session.user.thumbnailUrl} alt="" /> <Avatar src={this.props.session.session.user.thumbnailUrl} alt="" />
{this.props.session.session.user.username} {this.props.session.session.user.username}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment