1 | import { routerReducer, routerMiddleware } from 'react-router-redux'
|
2 | import thunk from 'redux-thunk'
|
3 | import {
|
4 | reducer as realtimeLocationReducer,
|
5 | REALTIME_LOCATION_REDUCER_NAME,
|
6 | } from './realtime-location'
|
7 | import { SERVER_REDUCER_NAME, serverReducer } from '../ReactApp/server/redux'
|
8 | import {
|
9 | reducerLocaleId as i18nReducerLocaleId,
|
10 |
|
11 | } from '../i18n/redux'
|
12 | import isI18nEnabled from '../i18n/is-enabled'
|
13 |
|
14 | import history from "./history"
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export const reducers = {
|
28 |
|
29 | 'routing': routerReducer,
|
30 |
|
31 | [REALTIME_LOCATION_REDUCER_NAME]: realtimeLocationReducer,
|
32 |
|
33 | [SERVER_REDUCER_NAME]: serverReducer,
|
34 | }
|
35 | if (isI18nEnabled()) {
|
36 | reducers.localeId = i18nReducerLocaleId
|
37 |
|
38 | }
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | export let initialState = {}
|
46 | if (__CLIENT__) initialState = window.__REDUX_STATE__
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | export const middlewares = [
|
54 | thunk,
|
55 | routerMiddleware(history),
|
56 | ]
|