mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 08:50:51 +01:00
Fixed room settings button didn't show for Moderator
This commit is contained in:
parent
c8fe1934f1
commit
dd03ab7d93
@ -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