latex-ub/services/web/frontend/js/features/pdf-preview/components/detach-compile-button-wrapper.tsx
2025-05-05 12:24:05 +00:00

15 lines
422 B
TypeScript

import { memo } from 'react'
import { useLayoutContext } from '../../../shared/context/layout-context'
import DetachCompileButton from './detach-compile-button'
function DetachCompileButtonWrapper() {
const { detachRole, detachIsLinked } = useLayoutContext()
if (detachRole !== 'detacher' || !detachIsLinked) {
return null
}
return <DetachCompileButton />
}
export default memo(DetachCompileButtonWrapper)