mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-29 05:00:06 +02:00

Convert PDF Preview components to typescript GitOrigin-RevId: 34594d21143727fa42b8b595aa12125a4dd7ae5e
26 lines
714 B
TypeScript
26 lines
714 B
TypeScript
import { useLayoutContext } from '../../../shared/context/layout-context'
|
|
import PdfSynctexControls from './pdf-synctex-controls'
|
|
|
|
export function DefaultSynctexControl() {
|
|
const { detachRole } = useLayoutContext()
|
|
if (!detachRole) {
|
|
return <PdfSynctexControls />
|
|
}
|
|
return null
|
|
}
|
|
|
|
export function DetacherSynctexControl() {
|
|
const { detachRole, detachIsLinked } = useLayoutContext()
|
|
if (detachRole === 'detacher' && detachIsLinked) {
|
|
return <PdfSynctexControls />
|
|
}
|
|
return null
|
|
}
|
|
|
|
export function DetachedSynctexControl() {
|
|
const { detachRole, detachIsLinked } = useLayoutContext()
|
|
if (detachRole === 'detached' && detachIsLinked) {
|
|
return <PdfSynctexControls />
|
|
}
|
|
return null
|
|
}
|