Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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