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.

AudioModerationNotifications.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  1. import React from 'react';
  2. import { useTranslation } from 'react-i18next';
  3. import { useSelector } from 'react-redux';
  4. import NotificationWithParticipants from '../../notifications/components/web/NotificationWithParticipants';
  5. import { approveAudio, dismissPendingAudioParticipant } from '../actions';
  6. import { getParticipantsAskingToAudioUnmute } from '../functions';
  7. /**
  8. * Component used to display a list of participants who asked to be unmuted.
  9. * This is visible only to moderators.
  10. *
  11. * @returns {React$Element<'ul'> | null}
  12. */
  13. export default function() {
  14. const participants = useSelector(getParticipantsAskingToAudioUnmute);
  15. const { t } = useTranslation();
  16. return participants.length
  17. ? (
  18. <>
  19. <div className = 'title'>
  20. { t('raisedHand') }
  21. </div>
  22. <NotificationWithParticipants
  23. approveButtonText = { t('notify.unmute') }
  24. onApprove = { approveAudio }
  25. onReject = { dismissPendingAudioParticipant }
  26. participants = { participants }
  27. rejectButtonText = { t('dialog.dismiss') }
  28. testIdPrefix = 'avModeration' />
  29. </>
  30. ) : null;
  31. }