Don't use boolean coersion

This commit is contained in:
Ray Schamp 2015-10-07 11:48:55 -04:00
parent a701c0829f
commit 31fb5911ea
2 changed files with 3 additions and 5 deletions

View file

@ -70,10 +70,9 @@ module.exports = React.createClass({
this.setState({'accountNavOpen': false});
},
render: function () {
var loggedIn = !!this.state.session.user;
var classes = classNames({
'inner': true,
'logged-in': this.state.loggedIn
'logged-in': this.state.session.user
});
return (
<div className={classes}>
@ -94,7 +93,7 @@ module.exports = React.createClass({
<Input type="hidden" name="sort_by" value="datetime_shared" />
</form>
</li>
{loggedIn ? [
{this.state.session.user ? [
<li className="link right messages" key="messages">
<a href="/messages/" title="Messages">Messages</a>
</li>,

View file

@ -30,10 +30,9 @@ var View = React.createClass({
// @todo API request for Featured
},
render: function () {
var loggedIn = !!this.state.session.user;
return (
<div className="inner">
{loggedIn ? [
{this.state.session.user ? [
<div key="header" className="splash-header">
<Activity />
<News />