Skip to content

Commit 530af89

Browse files
LianaHusAniket-Engg
authored andcommitted
fixing context menu
1 parent 6a0add9 commit 530af89

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

apps/remix-ide/src/app/ui/landing-page/landing-page.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const profile = {
1010
methods: [],
1111
events: [],
1212
description: 'Remix Home',
13-
icon: 'assets/img/home.webp',
1413
location: 'mainPanel',
1514
version: packageJson.version
1615
}

libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ interface MenuLinksProps {
2424
contextMenuAction: (evt: any, profileName: string, documentation: string) => void
2525
}
2626

27-
interface MenuProps {
28-
verticalIconsPlugin: Plugin
29-
profileName: string
30-
listItems: {Documentation: string; CanDeactivate: boolean}
31-
hide: () => void
32-
}
33-
3427
const VerticalIconsContextMenu = (props: VerticalIconsContextMenuProps) => {
3528
const menuRef = useRef(null)
3629
const [hasContextMenu, setHasContextMenu] = useState(false)
@@ -41,13 +34,13 @@ const VerticalIconsContextMenu = (props: VerticalIconsContextMenuProps) => {
4134
menuRef.current.focus()
4235
}, [])
4336
useEffect (() => {
44-
setHasContextMenu(!props.links.Documentation || !props.links.CanDeactivate)
45-
}, [props.links])
37+
setHasContextMenu(props.links.Documentation !=="" || props.links.CanDeactivate)
38+
}, [props.links, props.contextMenuAction])
4639

4740
return (
4841
<div
4942
id="menuItemsContainer"
50-
className="p-1 text-left remixui_verticalIconContextcontainer bg-light shadow border"
43+
className="p-2 text-left remixui_verticalIconContextcontainer bg-light shadow border"
5144
style={{
5245
left: props.pageX,
5346
top: props.pageY,
@@ -82,7 +75,7 @@ const MenuForLinks = ({ listItems, hide, profileName, contextMenuAction }: MenuL
8275
contextMenuAction(evt, profileName, listItems.Documentation)
8376
hide()
8477
}}
85-
className="px-3 remixui_liitem"
78+
className="remixui_liitem"
8679
key="menuitemdeactivate"
8780
>
8881
<FormattedMessage id="pluginManager.deactivate" />

0 commit comments

Comments
 (0)