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/app/reducer.ts

35 lines
715 B

import ReducerRegistry from '../redux/ReducerRegistry';
8 years ago
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from './actionTypes';
export interface IAppState {
app?: Object|undefined;
}
ReducerRegistry.register('features/base/app', (state: IAppState = {}, action) => {
switch (action.type) {
8 years ago
case APP_WILL_MOUNT: {
const { app } = action;
if (state.app !== app) {
return {
...state,
8 years ago
app
};
}
break;
8 years ago
}
case APP_WILL_UNMOUNT:
if (state.app === action.app) {
return {
...state,
app: undefined
};
}
break;
}
return state;
});