summaryrefslogtreecommitdiff
path: root/frontend/actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/actions.js')
-rw-r--r--frontend/actions.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/frontend/actions.js b/frontend/actions.js
new file mode 100644
index 0000000..fcbb6fc
--- /dev/null
+++ b/frontend/actions.js
@@ -0,0 +1,18 @@
+import { bindActionCreators } from 'redux'
+import { actions as crudActions } from './api'
+
+// import * as dashboardActions from './views/dashboard/dashboard.actions'
+
+import { store } from './store'
+
+export default
+ Object.keys(crudActions)
+ .map(a => [a, crudActions[a]])
+ .concat([
+ // ['dashboard', dashboardActions],
+ ])
+ .map(p => [p[0], bindActionCreators(p[1], store.dispatch)])
+ .concat([
+ ['socket', socketActions],
+ ])
+ .reduce((a,b) => (a[b[0]] = b[1])&&a,{}) \ No newline at end of file