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

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