2022-03-31 07:22:36 -04:00
|
|
|
import ReactDOM from 'react-dom'
|
|
|
|
import PdfPreview from './pdf-preview'
|
|
|
|
import { ContextRoot } from '../../../shared/context/root-context'
|
2022-05-18 06:35:18 -04:00
|
|
|
import { Shortcuts } from './shortcuts'
|
2022-03-31 07:22:36 -04:00
|
|
|
|
|
|
|
function PdfPreviewDetachedRoot() {
|
|
|
|
return (
|
|
|
|
<ContextRoot>
|
2022-05-18 06:35:18 -04:00
|
|
|
<Shortcuts>
|
|
|
|
<PdfPreview />
|
|
|
|
</Shortcuts>
|
2022-03-31 07:22:36 -04:00
|
|
|
</ContextRoot>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default PdfPreviewDetachedRoot // for testing
|
|
|
|
|
|
|
|
const element = document.getElementById('pdf-preview-detached-root')
|
|
|
|
if (element) {
|
|
|
|
ReactDOM.render(<PdfPreviewDetachedRoot />, element)
|
|
|
|
}
|