fix(participants-pane): Don't show 'grant moderator' action if already moderator
This commit is contained in:
parent
a564ce581d
commit
db9b8784ac
|
@ -328,7 +328,7 @@ export function isLocalParticipantModerator(stateful: Object | Function) {
|
|||
return false;
|
||||
}
|
||||
|
||||
return localParticipant.role === PARTICIPANT_ROLE.MODERATOR;
|
||||
return isParticipantModerator(localParticipant);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
IconMuteEveryoneElse,
|
||||
IconVideoOff
|
||||
} from '../../base/icons';
|
||||
import { isLocalParticipantModerator } from '../../base/participants';
|
||||
import { isLocalParticipantModerator, isParticipantModerator } from '../../base/participants';
|
||||
import { getIsParticipantVideoMuted } from '../../base/tracks';
|
||||
import { openChat } from '../../chat/actions';
|
||||
import { GrantModeratorDialog, KickRemoteParticipantDialog, MuteEveryoneDialog } from '../../video-menu';
|
||||
|
@ -146,7 +146,7 @@ export const MeetingParticipantContextMenu = ({
|
|||
))}
|
||||
</ContextMenuItemGroup>
|
||||
<ContextMenuItemGroup>
|
||||
{isLocalModerator && (
|
||||
{isLocalModerator && !isParticipantModerator(participant) && (
|
||||
<ContextMenuItem onClick = { grantModerator }>
|
||||
<ContextMenuIcon src = { IconCrown } />
|
||||
<span>{t('toolbar.accessibilityLabel.grantModerator')}</span>
|
||||
|
|
Loading…
Reference in New Issue