1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

handle new note button & note list

This commit is contained in:
Dick Choi
2016-05-22 23:44:49 +09:00
parent 89a76d9ead
commit 93d3ea70fc
11 changed files with 208 additions and 79 deletions

View File

@@ -105,6 +105,16 @@ function repositories (state = initialRepositories, action) {
targetRepo.folders.splice(targetFolderIndex, 1)
}
return repos
}
case 'ADD_NOTE':
{
let repos = state.slice()
let targetRepo = _.find(repos, {key: action.repository})
if (targetRepo == null) return state
targetRepo.notes.push(action.note)
return repos
}
}