X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0d71d490e24d2f1dae33360f194259bb597f2799..e6039bec0497aa7e1391958e5c4f84bbaeef653e:/src/views-components/context-menu/context-menu.tsx

diff --git a/src/views-components/context-menu/context-menu.tsx b/src/views-components/context-menu/context-menu.tsx
index eb965044..cc103c49 100644
--- a/src/views-components/context-menu/context-menu.tsx
+++ b/src/views-components/context-menu/context-menu.tsx
@@ -9,14 +9,13 @@ import ContextMenu, { ContextMenuProps, ContextMenuItem } from "../../components
 import { createAnchorAt } from "../../components/popover/helpers";
 import { ContextMenuResource } from "../../store/context-menu/context-menu-reducer";
 import { ContextMenuActionSet, ContextMenuAction } from "./context-menu-action-set";
-import { emptyActionSet } from "./action-sets/empty-action-set";
 
 type DataProps = Pick<ContextMenuProps, "anchorEl" | "items"> & { resource?: ContextMenuResource };
 const mapStateToProps = (state: RootState): DataProps => {
     const { position, resource } = state.contextMenu;
     return {
         anchorEl: resource ? createAnchorAt(position) : undefined,
-        items: getMenuItemSet(resource),
+        items: getMenuActionSet(resource),
         resource
     };
 };
@@ -44,13 +43,13 @@ const mergeProps = ({ resource, ...dataProps }: DataProps, actionProps: ActionPr
 
 export const ContextMenuHOC = connect(mapStateToProps, mapDispatchToProps, mergeProps)(ContextMenu);
 
-const menuItemSets = new Map<string, ContextMenuActionSet>();
+const menuActionSets = new Map<string, ContextMenuActionSet>();
 
-export const addMenuItemsSet = (name: string, itemSet: ContextMenuActionSet) => {
-    menuItemSets.set(name, itemSet);
+export const addMenuActionSet = (name: string, itemSet: ContextMenuActionSet) => {
+    menuActionSets.set(name, itemSet);
 };
 
-const getMenuItemSet = (resource?: ContextMenuResource): ContextMenuActionSet => {
-    return resource ? menuItemSets.get(resource.kind) || emptyActionSet : emptyActionSet;
+const getMenuActionSet = (resource?: ContextMenuResource): ContextMenuActionSet => {
+    return resource ? menuActionSets.get(resource.kind) || [] : [];
 };
 
