client/src/components/Session.js
changeset 129 d48946d164c6
parent 125 c653f49fabfb
child 137 279e1dffa213
--- a/client/src/components/Session.js	Tue Jul 25 19:11:26 2017 +0200
+++ b/client/src/components/Session.js	Fri Jul 28 19:40:35 2017 +0200
@@ -11,6 +11,7 @@
 import * as sessionsActions from '../actions/sessionsActions';
 import * as notesActions from '../actions/notesActions';
 import * as userActions from '../actions/userActions';
+import { ActionEnum } from '../constants';
 
 class Session extends Component {
   render() {
@@ -55,13 +56,13 @@
 
   const sessionId = props.match.params.id;
 
-  const sessions = state['sessions'];
-  const notes = state['notes'];
-  const autoSubmit = state['autoSubmit'];
+  const sessions = state.get('sessions');
+  const notes = state.get('notes');
+  const autoSubmit = state.get('autoSubmit');
 
   const currentSession = sessions.find(session => session._id === sessionId);
   const currentNotes = notes.filter(note => {
-        return (note.session === sessionId && !note.deleted);
+        return (note.get('session') === sessionId && note.get('action') !== ActionEnum.DELETED);
     }).sortBy( n => n.get('startedAt') );
 
   return {