|
|
@ -1,23 +1,15 @@ |
|
|
|
import { useState, useEffect } from 'react'; |
|
|
|
|
|
|
|
// import { VncScreen } from 'react-vnc';
|
|
|
|
|
|
|
|
import VncDisplay from 'react-vnc-display'; |
|
|
|
import VncDisplay from 'react-vnc-display'; |
|
|
|
import { Panel } from './Panels'; |
|
|
|
import { Panel } from './Panels'; |
|
|
|
import { HeaderText } from './Text'; |
|
|
|
import { HeaderText } from './Text'; |
|
|
|
|
|
|
|
|
|
|
|
const Display = (): JSX.Element => { |
|
|
|
const Display = (): JSX.Element => { |
|
|
|
const [mounted, setMounted] = useState<boolean>(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
setMounted(typeof window !== 'undefined'); |
|
|
|
|
|
|
|
}, [mounted]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Panel> |
|
|
|
<Panel> |
|
|
|
<HeaderText text="Display" /> |
|
|
|
<HeaderText text="Display" /> |
|
|
|
<VncDisplay |
|
|
|
<VncDisplay |
|
|
|
url="wss://spain.cdot.systems:5000/" |
|
|
|
url="wss://spain.cdot.systems:5000/" |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
width: '51vw', |
|
|
|
width: '50vw', |
|
|
|
height: '70vh', |
|
|
|
height: '70vh', |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
/> |
|
|
|