This commit is contained in:
MyNameIsBatman 2022-04-24 00:47:00 -03:00
parent ed211519a7
commit 5c2ead3481

View File

@ -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>