client/src/components/SessionList.js
changeset 124 c77570164050
parent 95 7bc08467c726
child 129 d48946d164c6
--- a/client/src/components/SessionList.js	Wed Jul 19 17:03:40 2017 +0200
+++ b/client/src/components/SessionList.js	Thu Jul 20 11:23:08 2017 +0200
@@ -55,10 +55,8 @@
             <Col md={6} mdOffset={3}>
               <ListGroup>
                 {this.props.sessions.map((session) =>
-                  <ListGroupItem
-                    key={session.get('_id')}
-                    onClick={() => this.props.history.push('/sessions/' + session.get('_id'))}>
-                    {session.title || 'No title'} {session.get('_id')} {moment(session.get('date')).format('DD/MM/YYYY')}
+                  <ListGroupItem key={session.get('_id')}>
+                    <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>
                     <a className="pull-right" onClick={ this.onClickDelete.bind(this, session) }>
                       <span className="material-icons">delete</span>
                     </a>
@@ -87,7 +85,7 @@
 
 function mapStateToProps(state, props) {
   return {
-    sessions: state['sessions']
+    sessions: state['sessions'].filter(session => !session.deleted)
   };
 }