fix(breakout-rooms): close option shown to non-moderators (#10648)
Co-authored-by: Werner Fleischer <70745309+wernf@users.noreply.github.com>
This commit is contained in:
parent
39e0dc84e0
commit
ce0a044742
|
@ -62,23 +62,24 @@ const BreakoutRoomContextMenu = ({ room }: Props) => {
|
||||||
<Text style = { styles.contextMenuItemText }>{t('breakoutRooms.actions.join')}</Text>
|
<Text style = { styles.contextMenuItemText }>{t('breakoutRooms.actions.join')}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
{!room?.isMainRoom && isLocalModerator
|
{!room?.isMainRoom && isLocalModerator
|
||||||
&& !(room?.participants && Object.keys(room.participants).length > 0)
|
&& (room?.participants && Object.keys(room.participants).length > 0
|
||||||
? <TouchableOpacity
|
? <TouchableOpacity
|
||||||
onPress = { onRemoveBreakoutRoom }
|
onPress = { onCloseBreakoutRoom }
|
||||||
style = { styles.contextMenuItem }>
|
style = { styles.contextMenuItem }>
|
||||||
<Icon
|
<Icon
|
||||||
size = { 24 }
|
size = { 24 }
|
||||||
src = { IconClose } />
|
src = { IconClose } />
|
||||||
<Text style = { styles.contextMenuItemText }>{t('breakoutRooms.actions.remove')}</Text>
|
<Text style = { styles.contextMenuItemText }>{t('breakoutRooms.actions.close')}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
: <TouchableOpacity
|
: <TouchableOpacity
|
||||||
onPress = { onCloseBreakoutRoom }
|
onPress = { onRemoveBreakoutRoom }
|
||||||
style = { styles.contextMenuItem }>
|
style = { styles.contextMenuItem }>
|
||||||
<Icon
|
<Icon
|
||||||
size = { 24 }
|
size = { 24 }
|
||||||
src = { IconClose } />
|
src = { IconClose } />
|
||||||
<Text style = { styles.contextMenuItemText }>{t('breakoutRooms.actions.close')}</Text>
|
<Text style = { styles.contextMenuItemText }>{t('breakoutRooms.actions.remove')}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
</BottomSheet>
|
</BottomSheet>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue