|
|
@ -1,5 +1,5 @@ |
|
|
|
import { ListItem } from 'material-ui/List'; |
|
|
|
import React from 'react'; |
|
|
|
import {List, ListItem} from 'material-ui/List'; |
|
|
|
|
|
|
|
export default class SignedInList extends React.Component { |
|
|
|
constructor(props) { |
|
|
@ -19,22 +19,18 @@ export default class SignedInList extends React.Component { |
|
|
|
} |
|
|
|
|
|
|
|
tick() { |
|
|
|
this.setState({tick: this.state.tick++}); |
|
|
|
this.setState({ tick: this.state.tick += 1 }); |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|
const members = this.props.members.sort((l, r) => { |
|
|
|
return l.at.diff(r.at); |
|
|
|
}) |
|
|
|
const members = this.props.members.sort((l, r) => l.at.diff(r.at)) |
|
|
|
.reverse() |
|
|
|
.map((member) => { |
|
|
|
return <ListItem key={member.id} primaryText={member.text} secondaryText={`${member.purpose} – ${member.at.fromNow()}`} /> |
|
|
|
}); |
|
|
|
.map(member => <ListItem key={member.id} primaryText={member.text} secondaryText={`${member.purpose} – ${member.at.fromNow()}`} />); |
|
|
|
|
|
|
|
return ( |
|
|
|
<div className="mdl-cell mdl-cell--12-col"> |
|
|
|
<h3>Members signed in</h3> |
|
|
|
{!!members.length ? members : 'No members currently signed in.'} |
|
|
|
{members.length ? members : 'No members currently signed in.'} |
|
|
|
</div> |
|
|
|
); |
|
|
|
} |
|
|
|