diff -r 2e4e9f9ebc4f -r f16a080e0bc4 client/src/components/Session.js --- a/client/src/components/Session.js Mon Jun 19 18:32:27 2017 +0200 +++ b/client/src/components/Session.js Mon Jun 19 21:37:33 2017 +0200 @@ -13,7 +13,7 @@ class Session extends Component { componentDidMount = () => { - this.props.notesActions.loadNotesBySession({ _id: this.props.match.params.id }); + //this.props.notesActions.loadNotesBySession({ _id: this.props.match.params.id }); } render() { @@ -50,14 +50,20 @@ const sessionId = props.match.params.id; - const sessions = state.get('sessions'); - const notes = state.get('notes'); +// 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, }; }