Skip to content

Instantly share code, notes, and snippets.

@khle
Created January 9, 2016 15:38
Show Gist options
  • Save khle/061bf5fe39676549f1cd to your computer and use it in GitHub Desktop.
Save khle/061bf5fe39676549f1cd to your computer and use it in GitHub Desktop.
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