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

1234567891011121314151617181920212223242526272829303132
  1. import { ReducerRegistry } from '../base/redux';
  2. import {
  3. UPDATE_DIAL_IN_NUMBERS_FAILED,
  4. UPDATE_DIAL_IN_NUMBERS_SUCCESS
  5. } from './actionTypes';
  6. const DEFAULT_STATE = {
  7. numbersEnabled: true
  8. };
  9. ReducerRegistry.register('features/invite', (state = DEFAULT_STATE, action) => {
  10. switch (action.type) {
  11. case UPDATE_DIAL_IN_NUMBERS_FAILED:
  12. return {
  13. ...state,
  14. error: action.error
  15. };
  16. case UPDATE_DIAL_IN_NUMBERS_SUCCESS: {
  17. const { numbers, numbersEnabled } = action.dialInNumbers;
  18. return {
  19. conferenceID: action.conferenceID,
  20. numbers,
  21. numbersEnabled
  22. };
  23. }
  24. }
  25. return state;
  26. });