overleaf/services/web/frontend/js/features/pdf-preview/components/pdf-preview-detached-root.js
Timothée Alby 32741c07e0 Merge pull request #8218 from overleaf/ta-pdf-detach-safari-warnings
PDF Detach Safari Warning

GitOrigin-RevId: e6f8942d8c8c141d887c44921a09716c4e4c85ae
2022-05-31 08:04:36 +00:00

23 lines
667 B
JavaScript

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