blob: 31e0a52083d7fcb3f04c307fd335c34fe48eeea2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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,{})
|