您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

hooks.ts 585B

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