diff --git a/src/components/room/RoomView.tsx b/src/components/room/RoomView.tsx index 661d1452..84e3d70e 100644 --- a/src/components/room/RoomView.tsx +++ b/src/components/room/RoomView.tsx @@ -12,7 +12,6 @@ export const RoomView: FC<{}> = props => { const [ roomSession, setRoomSession ] = useState(null); const [ widgetHandler, setWidgetHandler ] = useState(null); - const [ isSpectator, setIsSpectator ] = useState(false); const elementRef = useRef(); 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 => <> - { isSpectator && } + { roomSession.isSpectator && } }