Skip to content
Permalink
Browse files

API redux-logger respects ss environment

  • Loading branch information...
Damian Mooyman authored and chillu committed Apr 20, 2016
1 parent 9331b40 commit e463fcce6eaa80719a4f14d59dca9ee56d1f3d12

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -22,7 +22,13 @@ function appBoot() {

const initialState = {};
const rootReducer = combineReducers(reducerRegister.getAll());
const createStoreWithMiddleware = applyMiddleware(thunkMiddleware, createLogger())(createStore);

// Combine middleware
const middleware = [thunkMiddleware];
if (window.ss.config.environment === 'dev') {
middleware.push(createLogger());
}
const createStoreWithMiddleware = applyMiddleware(...middleware)(createStore);

// TODO: The store needs to be passed into route callbacks on the route context.
window.store = createStoreWithMiddleware(rootReducer, initialState);
@@ -104,7 +104,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
'BatchActionsForm',
'schema',
];
private static $dependencies = [
'schema' => '%$FormSchema'
];
@@ -198,6 +198,9 @@ public function getCombinedClientConfig() {
$token = SecurityToken::inst();
$combinedClientConfig[$token->getName()] = $token->getValue();
// Set env
$combinedClientConfig['environment'] = Director::get_environment_type();
return Convert::raw2json($combinedClientConfig);
}

0 comments on commit e463fcc

Please sign in to comment.
You can’t perform that action at this time.