mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 06:40:50 +01:00
Merge branch 'dev' into 'dev'
Fixed room settings button didn't show for Moderator See merge request nitro/nitro-react!29
This commit is contained in:
commit
816c2add65
@ -20,13 +20,15 @@ export const NavigatorRoomInfoView: FC<NavigatorRoomInfoViewProps> = props =>
|
||||
const [ isRoomPicked, setIsRoomPicked ] = useState(false);
|
||||
const [ isRoomMuted, setIsRoomMuted ] = useState(false);
|
||||
const { navigatorData = null } = useNavigatorContext();
|
||||
const isMod = GetSessionDataManager().isModerator;
|
||||
|
||||
|
||||
const hasPermission = (permission: string) =>
|
||||
{
|
||||
switch(permission)
|
||||
{
|
||||
case 'settings':
|
||||
return (GetSessionDataManager().userId === navigatorData.enteredGuestRoom.ownerId);
|
||||
return (GetSessionDataManager().userId === navigatorData.enteredGuestRoom.ownerId || isMod );
|
||||
case 'staff_pick':
|
||||
return GetSessionDataManager().securityLevel >= SecurityLevel.COMMUNITY;
|
||||
default: return false;
|
||||
|
Loading…
Reference in New Issue
Block a user