diff --git a/ui/src/shared/components/LayoutCellMenu.tsx b/ui/src/shared/components/LayoutCellMenu.tsx index 6853b6a44..8253ad04e 100644 --- a/ui/src/shared/components/LayoutCellMenu.tsx +++ b/ui/src/shared/components/LayoutCellMenu.tsx @@ -69,13 +69,7 @@ class LayoutCellMenu extends Component { } private get renderMenu(): JSX.Element { - const { - isEditable, - mode, - cell, - onDismissEditingAnnotation, - queries, - } = this.props + const {isEditable, mode, cell, onDismissEditingAnnotation} = this.props if (mode === EDITING && cellSupportsAnnotations(cell.type)) { return ( @@ -93,13 +87,7 @@ class LayoutCellMenu extends Component { if (isEditable && mode !== EDITING) { return (
- {queries.length ? ( - - ) : null} + {this.pencilMenu} { } } + private get pencilMenu(): JSX.Element { + const {queries} = this.props + + if (!queries.length) { + return + } + + return ( + + ) + } + private get contextMenuClassname(): string { const {subMenuIsOpen} = this.state