mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Don't use boolean coersion
This commit is contained in:
parent
a701c0829f
commit
31fb5911ea
2 changed files with 3 additions and 5 deletions
|
@ -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>,
|
||||
|
|
|
@ -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 />
|
||||
|
|
Loading…
Reference in a new issue