"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7305/react/features/reactions/functions.web.ts" (26 May 2023, 767 Bytes) of package /linux/misc/jitsi-meet-7305.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "functions.web.ts": jitsi-meet_8319_vs_jitsi-meet_8615.

    1 import { IReduxState } from '../app/types';
    2 import { getToolbarButtons } from '../base/config/functions.web';
    3 
    4 import { isReactionsEnabled } from './functions.any';
    5 
    6 export * from './functions.any';
    7 
    8 /**
    9  * Returns the visibility state of the reactions menu.
   10  *
   11  * @param {Object} state - The state of the application.
   12  * @returns {boolean}
   13  */
   14 export function getReactionsMenuVisibility(state: IReduxState): boolean {
   15     return state['features/reactions'].visible;
   16 }
   17 
   18 /**
   19  * Whether or not the reactions button is enabled.
   20  *
   21  * @param {Object} state - The Redux state object.
   22  * @returns {boolean}
   23  */
   24 export function isReactionsButtonEnabled(state: IReduxState) {
   25     return Boolean(getToolbarButtons(state).includes('reactions')) && isReactionsEnabled(state);
   26 }