mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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" />
|
|
))
|