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.web.ts 920B

123456789101112131415161718192021222324252627282930313233
  1. import ReducerRegistry from '../redux/ReducerRegistry';
  2. import { SET_UNSAFE_ROOM_CONSENT } from './actionTypes';
  3. import { IPreMeetingState } from './types';
  4. const DEFAULT_STATE: IPreMeetingState = {
  5. unsafeRoomConsent: false
  6. };
  7. /**
  8. * Listen for actions which changes the state of known and used devices.
  9. *
  10. * @param {IDevicesState} state - The Redux state of the feature features/base/devices.
  11. * @param {Object} action - Action object.
  12. * @param {string} action.type - Type of action.
  13. * @returns {IPreMeetingState}
  14. */
  15. ReducerRegistry.register<IPreMeetingState>(
  16. 'features/base/premeeting',
  17. (state = DEFAULT_STATE, action): IPreMeetingState => {
  18. switch (action.type) {
  19. case SET_UNSAFE_ROOM_CONSENT: {
  20. return {
  21. ...state,
  22. unsafeRoomConsent: action.consent
  23. };
  24. }
  25. default:
  26. return state;
  27. }
  28. });