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

hooks.web.ts 554B

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