You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reducer.js 560B

12345678910111213141516171819202122
  1. import { ReducerRegistry, set } from '../redux';
  2. import { SET_ASPECT_RATIO } from './actionTypes';
  3. import { ASPECT_RATIO_NARROW } from './constants';
  4. /**
  5. * The initial redux state of the feature base/responsive-ui.
  6. */
  7. const _INITIAL_STATE = {
  8. aspectRatio: ASPECT_RATIO_NARROW
  9. };
  10. ReducerRegistry.register(
  11. 'features/base/responsive-ui',
  12. (state = _INITIAL_STATE, action) => {
  13. switch (action.type) {
  14. case SET_ASPECT_RATIO:
  15. return set(state, 'aspectRatio', action.aspectRatio);
  16. }
  17. return state;
  18. });