Hide role dropdown icon in profile viewer (#215)
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
53f3ccc888
commit
be905ac7be
1 changed files with 2 additions and 1 deletions
|
@ -261,6 +261,7 @@ function ProfileViewer() {
|
|||
function renderProfile() {
|
||||
const member = room.getMember(userId) || mx.getUser(userId) || {};
|
||||
const avatarMxc = member.getMxcAvatarUrl?.() || member.avatarUrl;
|
||||
const canChangeRole = room.currentState.maySendEvent('m.room.power_levels', mx.getUserId());
|
||||
|
||||
return (
|
||||
<div className="profile-viewer">
|
||||
|
@ -277,7 +278,7 @@ function ProfileViewer() {
|
|||
</div>
|
||||
<div className="profile-viewer__user__role">
|
||||
<Text variant="b3">Role</Text>
|
||||
<Button iconSrc={ChevronBottomIC}>{getPowerLabel(member.powerLevel) || 'Member'}</Button>
|
||||
<Button iconSrc={canChangeRole ? ChevronBottomIC : null}>{getPowerLabel(member.powerLevel) || 'Member'}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<SessionInfo userId={userId} />
|
||||
|
|
Loading…
Reference in a new issue