client/src/components/NotesList.js
changeset 124 c77570164050
parent 84 bf35a7737f94
child 125 c653f49fabfb
equal deleted inserted replaced
123:6542f93cdc0d 124:c77570164050
    86 NotesList.propTypes = {
    86 NotesList.propTypes = {
    87   notes: PropTypes.instanceOf(Immutable.List).isRequired
    87   notes: PropTypes.instanceOf(Immutable.List).isRequired
    88 };
    88 };
    89 
    89 
    90 function mapStateToProps(state, props) {
    90 function mapStateToProps(state, props) {
    91   return props;
    91   return {
       
    92     ...props,
       
    93     notes : props.notes.filter(note => !note.deleted)
       
    94   };
    92 }
    95 }
    93 
    96 
    94 function mapDispatchToProps(dispatch) {
    97 function mapDispatchToProps(dispatch) {
    95   return {
    98   return {
    96     notesActions: bindActionCreators(notesActions, dispatch),
    99     notesActions: bindActionCreators(notesActions, dispatch),