mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
65b0fd73ea
* Improve "compile" keypress handling * Remove "compile" keypress handling from PDF preview * Remove compile shortcuts from CM6 * Use an event for Vim keybindings * Remove event handlers from Angular/Ace * Move useCompileTriggers into DetachCompileProvider GitOrigin-RevId: 7f0e667b5106a849458e06ebb0f7a413d5d63430
15 lines
566 B
JavaScript
15 lines
566 B
JavaScript
import PdfPreviewPane from './pdf-preview-pane'
|
|
import { memo } from 'react'
|
|
import withErrorBoundary from '../../../infrastructure/error-boundary'
|
|
import PdfPreviewErrorBoundaryFallback from './pdf-preview-error-boundary-fallback'
|
|
import { useLayoutContext } from '../../../shared/context/layout-context'
|
|
|
|
function PdfPreview() {
|
|
const { detachRole } = useLayoutContext()
|
|
if (detachRole === 'detacher') return null
|
|
return <PdfPreviewPane />
|
|
}
|
|
|
|
export default withErrorBoundary(memo(PdfPreview), () => (
|
|
<PdfPreviewErrorBoundaryFallback type="preview" />
|
|
))
|