diff -r abf9f3ff2635 -r 4cfeabef7d5e client/src/components/Session.js
--- a/client/src/components/Session.js Mon Jun 12 18:09:13 2017 +0200
+++ b/client/src/components/Session.js Mon Jun 12 18:12:38 2017 +0200
@@ -21,6 +21,10 @@
});
}
+ componentDidMount = () => {
+ this.props.notesActions.loadNotesBySession({ _id: this.props.match.params.id });
+ }
+
render() {
return (
@@ -34,7 +38,7 @@
Title
{ this.title = ref; }}
/>
@@ -43,7 +47,7 @@
Description
{ this.description = ref; }}
/>
@@ -70,14 +74,12 @@
const sessions = state.get('sessions');
const notes = state.get('notes');
-
- const currentSession = sessions.find(session => session.id === sessionId);
- const notesBySession = notes.filter(note => note.session === sessionId);
+ const currentSession = sessions.find(session => session._id === sessionId);
return {
currentSession: currentSession,
sessions: sessions,
- notes: notesBySession
+ notes: notes
};
}