mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
17 lines
345 B
JavaScript
17 lines
345 B
JavaScript
import deepFreeze from 'deep-freeze-strict';
|
|
import ACTION_TYPES from './ConfigActionTypes';
|
|
|
|
function configReducer(state = {}, action) {
|
|
switch (action.type) {
|
|
|
|
case ACTION_TYPES.SET_CONFIG:
|
|
return deepFreeze(Object.assign({}, state, action.payload.config));
|
|
|
|
default:
|
|
return state;
|
|
|
|
}
|
|
}
|
|
|
|
export default configReducer;
|