mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 07:39:02 +02:00
1d648f9755
Convert PDF Preview components to typescript GitOrigin-RevId: 34594d21143727fa42b8b595aa12125a4dd7ae5e
16 lines
422 B
TypeScript
16 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)
|