Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324
  1. import { useSelector } from 'react-redux';
  2. import { IReduxState } from '../app/types';
  3. import SharedDocumentButtonWeb from './components/SharedDocumentButton';
  4. const etherpad = {
  5. key: 'etherpad',
  6. Content: SharedDocumentButtonWeb,
  7. group: 3
  8. };
  9. /**
  10. * A hook that returns the etherpad button if it is enabled and undefined otherwise.
  11. *
  12. * @returns {Object | undefined}
  13. */
  14. export function useEtherpadButton() {
  15. const visible = useSelector((state: IReduxState) => Boolean(state['features/etherpad'].documentUrl));
  16. if (visible) {
  17. return etherpad;
  18. }
  19. }