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.tsx 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import React from 'react';
  2. import { useTranslation } from 'react-i18next';
  3. import { makeStyles } from 'tss-react/mui';
  4. import CopyButton from '../../../../base/buttons/CopyButton.web';
  5. import { getDecodedURI } from '../../../../base/util/uri';
  6. interface IProps {
  7. /**
  8. * The URL of the conference.
  9. */
  10. url: string;
  11. }
  12. const useStyles = makeStyles()(theme => {
  13. return {
  14. label: {
  15. display: 'block',
  16. marginBottom: theme.spacing(2)
  17. }
  18. };
  19. });
  20. /**
  21. * Component meant to enable users to copy the conference URL.
  22. *
  23. * @returns {React$Element<any>}
  24. */
  25. function CopyMeetingLinkSection({ url }: IProps) {
  26. const { classes } = useStyles();
  27. const { t } = useTranslation();
  28. return (
  29. <>
  30. <p className = { classes.label }>{t('addPeople.shareLink')}</p>
  31. <CopyButton
  32. accessibilityText = { t('addPeople.accessibilityLabel.meetingLink', { url: getDecodedURI(url) }) }
  33. className = 'invite-more-dialog-conference-url'
  34. displayedText = { getDecodedURI(url) }
  35. id = 'add-people-copy-link-button'
  36. textOnCopySuccess = { t('addPeople.linkCopied') }
  37. textOnHover = { t('addPeople.copyLink') }
  38. textToCopy = { url } />
  39. </>
  40. );
  41. }
  42. export default CopyMeetingLinkSection;