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
15 lines
422 B
TypeScript
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)
|