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

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