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 455B

12345678910111213141516171819
  1. import { ReducerRegistry, set } from '../redux';
  2. import { SET_ASPECT_RATIO } from './actionTypes';
  3. import { ASPECT_RATIO_NARROW } from './constants';
  4. const INITIAL_STATE = {
  5. aspectRatio: ASPECT_RATIO_NARROW
  6. };
  7. ReducerRegistry.register(
  8. 'features/base/aspect-ratio',
  9. (state = INITIAL_STATE, action) => {
  10. switch (action.type) {
  11. case SET_ASPECT_RATIO:
  12. return set(state, 'aspectRatio', action.aspectRatio);
  13. }
  14. return state;
  15. });