diff -r 7586b4a11c32 -r b2514a9bcd49 client/src/components/Session.js
--- a/client/src/components/Session.js Tue Jun 20 12:11:57 2017 +0200
+++ b/client/src/components/Session.js Tue Jun 20 14:13:15 2017 +0200
@@ -12,10 +12,6 @@
class Session extends Component {
- componentDidMount = () => {
- this.props.notesActions.loadNotesBySession({ _id: this.props.match.params.id });
- }
-
render() {
return (
@@ -50,14 +46,18 @@
const sessionId = props.match.params.id;
- const sessions = state.get('sessions');
- const notes = state.get('notes');
+ const sessions = state['sessions'];
+ const notes = state['notes'];
+
const currentSession = sessions.find(session => session._id === sessionId);
+ const currentNotes = notes.filter(note => {
+ return note.session === sessionId;
+ });
return {
currentSession,
sessions,
- notes,
+ notes: currentNotes,
};
}