overleaf/services/web/frontend/js/features/pdf-preview/components/pdf-preview-detached-root.js
Timothée Alby 3c01402bbd Merge pull request #7034 from overleaf/ta-pdf-detach-full
PDF Detach v2

GitOrigin-RevId: 3deb76474185f9176cde23ab32ef51b90df6e8e9
2022-04-05 12:19:23 +00:00

18 lines
447 B
JavaScript

import ReactDOM from 'react-dom'
import PdfPreview from './pdf-preview'
import { ContextRoot } from '../../../shared/context/root-context'
function PdfPreviewDetachedRoot() {
return (
<ContextRoot>
<PdfPreview />
</ContextRoot>
)
}
export default PdfPreviewDetachedRoot // for testing
const element = document.getElementById('pdf-preview-detached-root')
if (element) {
ReactDOM.render(<PdfPreviewDetachedRoot />, element)
}