Player: add the singleWindow option

This commit is contained in:
He4eT 2021-07-19 23:37:22 +05:00 committed by Alexey
commit 18da26dc20
4 changed files with 45 additions and 18 deletions

View file

@ -35,7 +35,7 @@ const prepareVM = ({ url, setStatus, setParts }) => {
})
}
export default function ({ url }) {
export default function ({ url, singleWindow }) {
const [status, setStatus] = useState(INITIAL_STATUS)
const [vmParts, setParts] = useState(null)
@ -47,6 +47,9 @@ export default function ({ url }) {
}, [url])
return vmParts
? (<Player vmParts={vmParts} />)
? (<Player {...{
vmParts,
singleWindow
}}/>)
: (<Status {...status} />)
}