overleaf/services/web/frontend/js/features/pdf-preview/components/pdf-preview.js

18 lines
499 B
JavaScript
Raw Normal View History

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" />
))