summaryrefslogtreecommitdiff
path: root/frontend/actions.js
blob: fcbb6fcc7e39b45fad4b76b41df1ef80c5a590a2 (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,{})