equal
deleted
inserted
replaced
53 <Grid fluid> |
53 <Grid fluid> |
54 <Row> |
54 <Row> |
55 <Col md={6} mdOffset={3}> |
55 <Col md={6} mdOffset={3}> |
56 <ListGroup> |
56 <ListGroup> |
57 {this.props.sessions.map((session) => |
57 {this.props.sessions.map((session) => |
58 <ListGroupItem |
58 <ListGroupItem key={session.get('_id')}> |
59 key={session.get('_id')} |
59 <span onClick={() => this.props.history.push('/sessions/' + session.get('_id'))}>{session.title || 'No title'} {session.get('_id')} {moment(session.get('date')).format('DD/MM/YYYY')}</span> |
60 onClick={() => this.props.history.push('/sessions/' + session.get('_id'))}> |
|
61 {session.title || 'No title'} {session.get('_id')} {moment(session.get('date')).format('DD/MM/YYYY')} |
|
62 <a className="pull-right" onClick={ this.onClickDelete.bind(this, session) }> |
60 <a className="pull-right" onClick={ this.onClickDelete.bind(this, session) }> |
63 <span className="material-icons">delete</span> |
61 <span className="material-icons">delete</span> |
64 </a> |
62 </a> |
65 </ListGroupItem> |
63 </ListGroupItem> |
66 )} |
64 )} |
85 } |
83 } |
86 } |
84 } |
87 |
85 |
88 function mapStateToProps(state, props) { |
86 function mapStateToProps(state, props) { |
89 return { |
87 return { |
90 sessions: state['sessions'] |
88 sessions: state['sessions'].filter(session => !session.deleted) |
91 }; |
89 }; |
92 } |
90 } |
93 |
91 |
94 function mapDispatchToProps(dispatch) { |
92 function mapDispatchToProps(dispatch) { |
95 return { |
93 return { |