Files
jitsi-meet/react/features/shared-video/reducer.web.js
Calinteodor 430591bd1e feat(shared-video) refactor dialog to use React
Also unify the mobile and web features into one, even though internally they still have separate ways to enable the functionality.
2021-03-03 15:37:38 +01:00

30 lines
608 B
JavaScript

// @flow
import { ReducerRegistry } from '../base/redux';
import { SET_SHARED_VIDEO_STATUS, SET_DISABLE_BUTTON } from './actionTypes';
/**
* Reduces the Redux actions of the feature features/shared-video.
*/
ReducerRegistry.register('features/shared-video', (state = {}, action) => {
const { status, disabled } = action;
switch (action.type) {
case SET_SHARED_VIDEO_STATUS:
return {
...state,
status
};
case SET_DISABLE_BUTTON:
return {
...state,
disabled
};
default:
return state;
}
});