|
@@ -7,6 +7,7 @@ import IconChecked from '../../../shared/components/icon-checked'
|
|
|
import ControlledDropdown from '../../../shared/components/controlled-dropdown'
|
|
import ControlledDropdown from '../../../shared/components/controlled-dropdown'
|
|
|
import IconEditorOnly from './icon-editor-only'
|
|
import IconEditorOnly from './icon-editor-only'
|
|
|
import IconPdfOnly from './icon-pdf-only'
|
|
import IconPdfOnly from './icon-pdf-only'
|
|
|
|
|
+import { useCompileContext } from '../../../shared/context/compile-context'
|
|
|
import { useLayoutContext } from '../../../shared/context/layout-context'
|
|
import { useLayoutContext } from '../../../shared/context/layout-context'
|
|
|
import * as eventTracking from '../../../infrastructure/event-tracking'
|
|
import * as eventTracking from '../../../infrastructure/event-tracking'
|
|
|
|
|
|
|
@@ -54,10 +55,13 @@ function LayoutDropdownButton() {
|
|
|
pdfLayout,
|
|
pdfLayout,
|
|
|
} = useLayoutContext(layoutContextPropTypes)
|
|
} = useLayoutContext(layoutContextPropTypes)
|
|
|
|
|
|
|
|
|
|
+ const { stopCompile } = useCompileContext()
|
|
|
|
|
+
|
|
|
const handleDetach = useCallback(() => {
|
|
const handleDetach = useCallback(() => {
|
|
|
detach()
|
|
detach()
|
|
|
|
|
+ stopCompile()
|
|
|
eventTracking.sendMB('project-layout-detach')
|
|
eventTracking.sendMB('project-layout-detach')
|
|
|
- }, [detach])
|
|
|
|
|
|
|
+ }, [detach, stopCompile])
|
|
|
|
|
|
|
|
const handleReattach = useCallback(() => {
|
|
const handleReattach = useCallback(() => {
|
|
|
if (detachRole !== 'detacher') {
|
|
if (detachRole !== 'detacher') {
|