Last active
February 3, 2017 08:55
-
-
Save ozanturksever/c5565c6f4ff9b0b4ca4fcae64ad58551 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import saveTask from '../actions/saveTask'; | |
import { state } from 'cerebral/tags'; | |
export default (unSavedTasks) => { | |
return unSavedTasks.reduce((m, key) => { | |
const task = state.get(`Task.tasks.${key}`); | |
const action = function(context) { | |
return saveTask({ task, ...context }) | |
} | |
m.push(action) | |
return m | |
}, []) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import saveTasksFactory from './factory/saveTasksFactory'; | |
import unSavedTasks from './compute/unSavedTasks'; | |
export default { | |
signals: { | |
saveTasksButtonPressed: saveTasksFactory(unSavedTasks), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment