Skip to content

Commit

Permalink
Check that a user exists
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-c committed Jun 29, 2016
1 parent 242da56 commit ea4c946
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/pages/admin.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ module.exports = React.createClass

render: ->
<div>
<ChangeListener target={@props.user}>{ =>
if @props.user?
{if @props.user?
<ChangeListener target={@props.user}>{ =>
if @props.user.admin
<AdminPage {...@props} />
else
<div className="content-container">
<p>You are not an administrator</p>
</div>
else
<div className="content-container">
<p>You’re not signed in.</p>
</div>
}</ChangeListener>
}</ChangeListener>
else
<div className="content-container">
<p>You’re not signed in.</p>
</div>}
</div>

0 comments on commit ea4c946

Please sign in to comment.