您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. });