mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
Extra
This commit is contained in:
parent
ed211519a7
commit
5c2ead3481
@ -12,7 +12,6 @@ export const RoomView: FC<{}> = props =>
|
||||
{
|
||||
const [ roomSession, setRoomSession ] = useState<IRoomSession>(null);
|
||||
const [ widgetHandler, setWidgetHandler ] = useState<IRoomWidgetHandlerManager>(null);
|
||||
const [ isSpectator, setIsSpectator ] = useState<boolean>(false);
|
||||
const elementRef = useRef<HTMLDivElement>();
|
||||
|
||||
const onRoomEngineEvent = useCallback((event: RoomEngineEvent) =>
|
||||
@ -145,7 +144,6 @@ export const RoomView: FC<{}> = props =>
|
||||
stage.addChild(displayObject);
|
||||
|
||||
SetActiveRoomId(roomSession.roomId);
|
||||
setIsSpectator(roomSession.isSpectator);
|
||||
}, [ roomSession, resize ]);
|
||||
|
||||
useEffect(() =>
|
||||
@ -187,7 +185,7 @@ export const RoomView: FC<{}> = props =>
|
||||
<>
|
||||
<RoomColorView />
|
||||
<RoomWidgetsView />
|
||||
{ isSpectator && <RoomSpectatorView /> }
|
||||
{ roomSession.isSpectator && <RoomSpectatorView /> }
|
||||
</> }
|
||||
</Base>
|
||||
</RoomContextProvider>
|
||||
|
Loading…
Reference in New Issue
Block a user