mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
delete note
This commit is contained in:
@@ -18,6 +18,7 @@ function storages (state = [], action) {
|
||||
case 'ADD_FOLDER':
|
||||
case 'REMOVE_FOLDER':
|
||||
case 'UPDATE_STORAGE':
|
||||
case 'RENAME_STORAGE':
|
||||
{
|
||||
let storages = state.slice()
|
||||
storages = storages
|
||||
@@ -83,6 +84,12 @@ function notes (state = [], action) {
|
||||
notes.push(action.newNote)
|
||||
return notes
|
||||
}
|
||||
case 'REMOVE_NOTE':
|
||||
{
|
||||
let notes = state.slice()
|
||||
notes = notes.filter((note) => note.key !== action.note.key || note.folder !== action.note.folder || note.storage !== action.note.storage)
|
||||
return notes
|
||||
}
|
||||
}
|
||||
return state
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user