Created
January 9, 2016 15:38
-
-
Save khle/061bf5fe39676549f1cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PresencePane = React.createClass({ | |
render() { | |
return ( | |
<div> | |
<h4>Active Users</h4> | |
<table className="striped"> | |
<thead> | |
<tr> | |
<th data-field="id">Nickname</th> | |
<th data-field="name">Time joined</th> | |
</tr> | |
</thead> | |
<tbody> | |
{ | |
this.props.data.map((user, index) => { | |
return <tr key={user.nickname}> | |
<td>{user.nickname}</td> | |
<td>{moment(user.connectTime).format('YYYY-MM-DD HH:mm:ss')}</td> | |
</tr> | |
}) | |
} | |
</tbody> | |
</table> | |
</div> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment