|
|
@ -9,8 +9,6 @@ import promiseMiddleware from './promise-middleware';
|
|
|
|
|
|
|
|
|
|
|
|
import * as EteSync from './api/EteSync';
|
|
|
|
import * as EteSync from './api/EteSync';
|
|
|
|
|
|
|
|
|
|
|
|
const loggerMiddleware = createLogger();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface FetchType<T> {
|
|
|
|
export interface FetchType<T> {
|
|
|
|
value: T | null;
|
|
|
|
value: T | null;
|
|
|
|
fetching?: boolean;
|
|
|
|
fetching?: boolean;
|
|
|
@ -175,13 +173,18 @@ const reducers = combineReducers({
|
|
|
|
})
|
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
export const store = createStore(
|
|
|
|
let middleware = [
|
|
|
|
reducers,
|
|
|
|
|
|
|
|
applyMiddleware(
|
|
|
|
|
|
|
|
thunkMiddleware,
|
|
|
|
thunkMiddleware,
|
|
|
|
promiseMiddleware,
|
|
|
|
promiseMiddleware,
|
|
|
|
loggerMiddleware
|
|
|
|
];
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
|
|
|
|
middleware.push(createLogger());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const store = createStore(
|
|
|
|
|
|
|
|
reducers,
|
|
|
|
|
|
|
|
applyMiddleware(...middleware)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
export const persistor = persistStore(store);
|
|
|
|
export const persistor = persistStore(store);
|
|
|
|