summaryrefslogtreecommitdiff
path: root/client/store.js
blob: a404a19daef6fd5d6c3f40e8231622322a674998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { applyMiddleware, compose, combineReducers, createStore } from 'redux'
import thunk from 'redux-thunk'

// import faceAnalysisReducer from './faceAnalysis/faceAnalysis.reducer'
// import faceSearchReducer from './faceSearch/faceSearch.reducer'
// import nameSearchReducer from './nameSearch/nameSearch.reducer'

const rootReducer = combineReducers({
  // faceAnalysis: faceAnalysisReducer,
  // faceSearch: faceSearchReducer,
  // nameSearch: nameSearchReducer,
})

function configureStore(initialState = {}) {
  const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose

  const store = createStore(
    rootReducer,
    initialState,
    composeEnhancers(
      applyMiddleware(
        thunk,
      ),
    ),
  )

  return store
}

const store = configureStore({})

export { store }