overleaf/services/web/frontend/js/features/pdf-preview/components/pdf-preview.js
June Kelly 03e1daa038 Merge pull request #5201 from overleaf/msm-pdf-viewer-error-boundaries
Error boundaries for React PDF viewer

GitOrigin-RevId: 90052fc183f7ece8125ecfb0410a529cf905c13b
2021-10-07 08:03:43 +00:00

17 lines
499 B
JavaScript

import PdfPreviewProvider from '../contexts/pdf-preview-context'
import PdfPreviewPane from './pdf-preview-pane'
import { memo } from 'react'
import withErrorBoundary from '../../../infrastructure/error-boundary'
import ErrorBoundaryFallback from './error-boundary-fallback'
function PdfPreview() {
return (
<PdfPreviewProvider>
<PdfPreviewPane />
</PdfPreviewProvider>
)
}
export default withErrorBoundary(memo(PdfPreview), () => (
<ErrorBoundaryFallback type="preview" />
))