Redux changes and refactoring
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
import { configureStore, getDefaultMiddleware } from 'redux-starter-kit';
|
||||
import {configureStore, createReducer, getDefaultMiddleware} from 'redux-starter-kit';
|
||||
import {mountReducer} from '../reducers/mount_reducer';
|
||||
|
||||
export default function createAppStore(preloadedState) {
|
||||
export default function createAppStore(platform, appPlatform) {
|
||||
const createCommonReducer = () => {
|
||||
return createReducer({
|
||||
AppPlatform: appPlatform,
|
||||
Platform: platform,
|
||||
}, {});
|
||||
};
|
||||
|
||||
const reducer = {
|
||||
common: createCommonReducer(platform, appPlatform),
|
||||
mounts: mountReducer,
|
||||
};
|
||||
|
||||
@@ -11,7 +19,6 @@ export default function createAppStore(preloadedState) {
|
||||
return configureStore({
|
||||
reducer,
|
||||
middleware,
|
||||
devTools: process.env.NODE_ENV !== 'production',
|
||||
preloadedState
|
||||
devTools: process.env.NODE_ENV !== 'production'
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user