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.

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. }