mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
03e1daa038
Error boundaries for React PDF viewer GitOrigin-RevId: 90052fc183f7ece8125ecfb0410a529cf905c13b
17 lines
499 B
JavaScript
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" />
|
|
))
|