import React, { useContext, useEffect, useRef } from 'react' import { AppViewer } from './AppViewer' import Frame from 'react-frame-component'; import { MyContext } from '../../App'; const AppViewerContainer = ({app, isSelected, hide}) => { const { rootHeight } = useContext(MyContext); const frameRef = useRef(null); return ( {/* Inject styles directly into the iframe */} } style={{ height: `calc(${rootHeight} - 60px - 45px)`, border: 'none', width: '100%', display: (!isSelected || hide) && 'none' }} > ) } export default AppViewerContainer