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

123456789101112131415161718192021222324252627282930313233343536
  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(
  10. 'features/invite/dial-in',
  11. (state = DEFAULT_STATE, action) => {
  12. switch (action.type) {
  13. case UPDATE_DIAL_IN_NUMBERS_FAILED: {
  14. return {
  15. ...state,
  16. error: action.error
  17. };
  18. }
  19. case UPDATE_DIAL_IN_NUMBERS_SUCCESS: {
  20. const { numbers, numbersEnabled } = action.dialInNumbers;
  21. return {
  22. conferenceId: action.conferenceId.id,
  23. error: null,
  24. numbers,
  25. numbersEnabled
  26. };
  27. }
  28. }
  29. return state;
  30. });