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.web.js 608B

1234567891011121314151617181920212223242526272829
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { SET_SHARED_VIDEO_STATUS, SET_DISABLE_BUTTON } from './actionTypes';
  4. /**
  5. * Reduces the Redux actions of the feature features/shared-video.
  6. */
  7. ReducerRegistry.register('features/shared-video', (state = {}, action) => {
  8. const { status, disabled } = action;
  9. switch (action.type) {
  10. case SET_SHARED_VIDEO_STATUS:
  11. return {
  12. ...state,
  13. status
  14. };
  15. case SET_DISABLE_BUTTON:
  16. return {
  17. ...state,
  18. disabled
  19. };
  20. default:
  21. return state;
  22. }
  23. });