var Player = React.createClass({ propTypes: { email: React.PropTypes.string, id: React.PropTypes.number }, render: function() { return (
{this.props.email}
{this.props.game.is_started ?
Inventory count: {this.props.inventory_count}
: null } {/* Show player controls if player is owned by current_user */} {(this.props.user_id == this.props.game.current_user_id) && (this.props.game.is_started == true) ? ( ) : null }
); } });