mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-17 02:01:46 +02:00
17 lines
333 B
JavaScript
17 lines
333 B
JavaScript
import deepFreeze from 'deep-freeze';
|
|
import ACTION_TYPES from './action-types';
|
|
|
|
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;
|