Files
jitsi-meet/react/features/reactions/functions.web.ts

28 lines
751 B
TypeScript
Raw Normal View History

import { IReduxState } from '../app/types';
2023-04-27 19:19:53 -05:00
import { isReactionsEnabled } from './functions.any';
2023-03-31 14:04:33 +03:00
export * from './functions.any';
/**
* Returns the visibility state of the reactions menu.
*
* @param {Object} state - The state of the application.
* @returns {boolean}
*/
export function getReactionsMenuVisibility(state: IReduxState): boolean {
return state['features/reactions'].visible;
}
2023-04-27 19:19:53 -05:00
/**
* Whether or not the reactions button is enabled.
*
* @param {Object} state - The Redux state object.
* @returns {boolean}
*/
export function isReactionsButtonEnabled(state: IReduxState) {
const { toolbarButtons } = state['features/toolbox'];
return Boolean(toolbarButtons?.includes('reactions')) && isReactionsEnabled(state);
2023-04-27 19:19:53 -05:00
}