detach-compile-button-wrapper.tsx 422 B

123456789101112131415
  1. import { memo } from 'react'
  2. import { useLayoutContext } from '../../../shared/context/layout-context'
  3. import DetachCompileButton from './detach-compile-button'
  4. function DetachCompileButtonWrapper() {
  5. const { detachRole, detachIsLinked } = useLayoutContext()
  6. if (detachRole !== 'detacher' || !detachIsLinked) {
  7. return null
  8. }
  9. return <DetachCompileButton />
  10. }
  11. export default memo(DetachCompileButtonWrapper)