2021-11-30 09:54:14 -05:00
|
|
|
import { useLayoutContext } from '../../../shared/context/layout-context'
|
|
|
|
import PdfSynctexControls from './pdf-synctex-controls'
|
|
|
|
|
2022-05-23 07:59:08 -04:00
|
|
|
export function DefaultSynctexControl() {
|
2023-10-18 05:14:13 -04:00
|
|
|
const { detachRole } = useLayoutContext()
|
2022-05-23 07:59:08 -04:00
|
|
|
if (!detachRole) {
|
|
|
|
return <PdfSynctexControls />
|
|
|
|
}
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
2021-11-30 09:54:14 -05:00
|
|
|
export function DetacherSynctexControl() {
|
2023-10-18 05:14:13 -04:00
|
|
|
const { detachRole, detachIsLinked } = useLayoutContext()
|
2021-11-30 09:54:14 -05:00
|
|
|
if (detachRole === 'detacher' && detachIsLinked) {
|
|
|
|
return <PdfSynctexControls />
|
|
|
|
}
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
|
|
|
export function DetachedSynctexControl() {
|
2023-10-18 05:14:13 -04:00
|
|
|
const { detachRole, detachIsLinked } = useLayoutContext()
|
2021-11-30 09:54:14 -05:00
|
|
|
if (detachRole === 'detached' && detachIsLinked) {
|
|
|
|
return <PdfSynctexControls />
|
|
|
|
}
|
|
|
|
return null
|
|
|
|
}
|