|
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
6
|
6
|
import { useSelector } from 'react-redux';
|
7
|
7
|
|
8
|
8
|
import { getParticipants } from '../../base/participants';
|
9
|
|
-import { findStyledAncestor } from '../functions';
|
|
9
|
+import { findStyledAncestor, shouldRenderInviteButton } from '../functions';
|
10
|
10
|
|
11
|
11
|
import { InviteButton } from './InviteButton';
|
12
|
12
|
import { MeetingParticipantContextMenu } from './MeetingParticipantContextMenu';
|
|
@@ -36,6 +36,7 @@ const initialState = Object.freeze(Object.create(null));
|
36
|
36
|
export const MeetingParticipantList = () => {
|
37
|
37
|
const isMouseOverMenu = useRef(false);
|
38
|
38
|
const participants = useSelector(getParticipants, _.isEqual);
|
|
39
|
+ const showInviteButton = useSelector(shouldRenderInviteButton);
|
39
|
40
|
const [ raiseContext, setRaiseContext ] = useState<RaiseContext>(initialState);
|
40
|
41
|
const { t } = useTranslation();
|
41
|
42
|
|
|
@@ -86,7 +87,7 @@ export const MeetingParticipantList = () => {
|
86
|
87
|
return (
|
87
|
88
|
<>
|
88
|
89
|
<Heading>{t('participantsPane.headings.participantsList', { count: participants.length })}</Heading>
|
89
|
|
- <InviteButton />
|
|
90
|
+ {showInviteButton && <InviteButton />}
|
90
|
91
|
<div>
|
91
|
92
|
{participants.map(p => (
|
92
|
93
|
<MeetingParticipantItem
|