forked from WorldBrain/Memex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstore.ts
35 lines (29 loc) · 1.03 KB
/
store.ts
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
33
34
35
import { createStore, combineReducers, compose, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import initSentry from '../util/raven'
import { reducer as collectionsBtn } from './collections-button'
import { reducer as blacklistBtn } from './blacklist-button'
import { reducer as bookmarkBtn } from './bookmark-button'
import { reducer as sidebarBtn } from './sidebar-button'
import { reducer as tooltipBtn } from './tooltip-button'
import { reducer as notifsBtn } from './notif-button'
import { reducer as pauseBtn } from './pause-button'
import { reducer as tagsBtn } from './tags-button'
import popup from './reducer'
const rootReducer = combineReducers({
collectionsBtn,
blacklistBtn,
bookmarkBtn,
sidebarBtn,
tooltipBtn,
notifsBtn,
pauseBtn,
tagsBtn,
popup,
})
export default function configureStore() {
const middlewares = [thunk]
initSentry(middlewares)
const enhancers = [applyMiddleware(...middlewares)]
return createStore(rootReducer, undefined, compose(...enhancers))
}