You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CopyMeetingLinkSection.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import React from 'react';
  3. import CopyButton from '../../../../base/buttons/CopyButton';
  4. import { translate } from '../../../../base/i18n';
  5. import { getDecodedURI } from '../../../../base/util';
  6. type Props = {
  7. /**
  8. * Invoked to obtain translated strings.
  9. */
  10. t: Function,
  11. /**
  12. * The URL of the conference.
  13. */
  14. url: string
  15. };
  16. /**
  17. * Component meant to enable users to copy the conference URL.
  18. *
  19. * @returns {React$Element<any>}
  20. */
  21. function CopyMeetingLinkSection({ t, url }: Props) {
  22. return (
  23. <>
  24. <label htmlFor = { 'copy-button-id' }>{t('addPeople.shareLink')}</label>
  25. <CopyButton
  26. aria-label = { t('addPeople.copyLink') }
  27. className = 'invite-more-dialog-conference-url'
  28. displayedText = { getDecodedURI(url) }
  29. id = 'copy-button-id'
  30. textOnCopySuccess = { t('addPeople.linkCopied') }
  31. textOnHover = { t('addPeople.copyLink') }
  32. textToCopy = { url } />
  33. </>
  34. );
  35. }
  36. export default translate(CopyMeetingLinkSection);