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.

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