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

12345678910111213141516171819202122232425
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { UPDATE_BREAKOUT_ROOMS } from './actionTypes';
  4. import { FEATURE_KEY } from './constants';
  5. /**
  6. * Listen for actions for the breakout-rooms feature.
  7. */
  8. ReducerRegistry.register(FEATURE_KEY, (state = { rooms: {} }, action) => {
  9. switch (action.type) {
  10. case UPDATE_BREAKOUT_ROOMS: {
  11. const { nextIndex, rooms } = action;
  12. return {
  13. ...state,
  14. nextIndex,
  15. rooms
  16. };
  17. }
  18. }
  19. return state;
  20. });