summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/reducers/folders.js1
-rw-r--r--client/reducers/tasks.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/client/reducers/folders.js b/client/reducers/folders.js
index bec4ad3..e77c954 100644
--- a/client/reducers/folders.js
+++ b/client/reducers/folders.js
@@ -3,7 +3,6 @@ import client from '../client'
const folders = (state = {}, action) => {
let file, files, folders, folder, openFolders, folder_id, filesAreLoaded
- console.log(action)
switch (action.type) {
case 'LOAD_FOLDERS':
return {
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
}