Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
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.
jitsi-meet/react/features/base/dialog/reducer.js

32 lines
794 B

import { ReducerRegistry, setStateProperties } from '../redux';
import {
HIDE_DIALOG,
OPEN_DIALOG
} from './actionTypes';
/**
* Listen for actions which show or hide dialogs.
*
* @param {Object[]} state - Current state.
* @param {Object} action - Action object.
* @param {string} action.type - Type of action.
* @returns {{}}
*/
ReducerRegistry.register('features/base/dialog', (state = {}, action) => {
switch (action.type) {
case HIDE_DIALOG:
return setStateProperties(state, {
component: undefined,
componentProps: undefined
});
case OPEN_DIALOG:
return setStateProperties(state, {
component: action.component,
componentProps: action.componentProps
});
}
return state;
});