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

hooks.web.ts 579B

1234567891011121314151617181920212223
  1. import { useSelector } from 'react-redux';
  2. import ReactionsMenuButton from './components/web/ReactionsMenuButton';
  3. import { isReactionsButtonEnabled } from './functions';
  4. const reactions = {
  5. key: 'reactions',
  6. Content: ReactionsMenuButton,
  7. group: 2
  8. };
  9. /**
  10. * A hook that returns the reactions button if it is enabled and undefined otherwise.
  11. *
  12. * @returns {Object | undefined}
  13. */
  14. export function useReactionsButton() {
  15. const reactionsButtonEnabled = useSelector(isReactionsButtonEnabled);
  16. if (reactionsButtonEnabled) {
  17. return reactions;
  18. }
  19. }