mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
73bc3418a2
GitOrigin-RevId: fcc88a362c3e97c9fddf85d47c3a83a0a0b89432
24 lines
724 B
JavaScript
24 lines
724 B
JavaScript
import { memo, Suspense } from 'react'
|
|
import PdfLogsViewer from './pdf-logs-viewer'
|
|
import PdfViewer from './pdf-viewer'
|
|
import { usePdfPreviewContext } from '../contexts/pdf-preview-context'
|
|
import withErrorBoundary from '../../../infrastructure/error-boundary'
|
|
import PdfPreviewToolbar from './pdf-preview-toolbar'
|
|
|
|
function PdfPreviewPane() {
|
|
const { showLogs } = usePdfPreviewContext()
|
|
|
|
return (
|
|
<div className="pdf full-size">
|
|
<PdfPreviewToolbar />
|
|
<Suspense fallback={<div>Loading…</div>}>
|
|
<div className="pdf-viewer">
|
|
<PdfViewer />
|
|
</div>
|
|
</Suspense>
|
|
{showLogs && <PdfLogsViewer />}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default memo(withErrorBoundary(PdfPreviewPane))
|