diff options
Diffstat (limited to 'client/reducers/tasks.js')
| -rw-r--r-- | client/reducers/tasks.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/reducers/tasks.js b/client/reducers/tasks.js index 470c7a7..c5f2c06 100644 --- a/client/reducers/tasks.js +++ b/client/reducers/tasks.js @@ -5,8 +5,10 @@ const tasks = (state = [], action) => { switch (action.type) { case 'LOAD_TASKS': return action.tasks + case 'ADD_TASK': return [action.task].concat(state) + case 'TASK_UPDATED': const updated_tasks = state.map(task => { if (task.id == id) { @@ -15,6 +17,7 @@ const tasks = (state = [], action) => { return id }) return updated_tasks + default: return state } |
