Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

functions.web.ts 751B

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