blob: 69b06f02b21b65df438bcfbe6b8229b9c75cbbe4 (
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 siteActions from './views/site/site.actions'
import { store } from './store'
export default
Object.keys(crudActions)
.map(a => [a, crudActions[a]])
.concat([
['site', siteActions],
])
.map(p => [p[0], bindActionCreators(p[1], store.dispatch)])
.concat([
// ['socket', socketActions],
])
.reduce((a,b) => (a[b[0]] = b[1])&&a,{})
|