Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

reducer.js 816B

1234567891011121314151617181920212223242526272829303132333435363738
  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 {
  18. defaultCountry,
  19. numbers,
  20. numbersEnabled
  21. } = action.dialInNumbers;
  22. return {
  23. ...state,
  24. conferenceID: action.conferenceID,
  25. defaultCountry,
  26. numbers,
  27. numbersEnabled
  28. };
  29. }
  30. }
  31. return state;
  32. });