From e9c0ffcd5d58310c6cff6a5a73bdf6062485eba4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 19 Jul 2017 02:31:06 +0200 Subject: etc --- client/reducers/tasks.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client/reducers/tasks.js') 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 } -- cgit v1.2.3-70-g09d2