Merge branch '13784-add-to-favorite'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / project-action-set.ts
index 66dbd4d16c5ba30034d5de8283ff5d8f4ea6c712..e0a5e5412616a8690df6e5de1184e46cf201a275 100644 (file)
@@ -4,7 +4,9 @@
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
 import { projectActions } from "../../../store/project/project-action";
-import { ShareIcon, NewProjectIcon  } from "../../../components/icon/icon";
+import { NewProjectIcon } from "../../../components/icon/icon";
+import { ToggleFavoriteAction } from "./favorite-action";
+import { toggleFavorite } from "../../../store/favorites/favorites-actions";
 
 export const projectActionSet: ContextMenuActionSet = [[{
     icon: NewProjectIcon,
@@ -13,7 +15,8 @@ export const projectActionSet: ContextMenuActionSet = [[{
         dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
     }
 }, {
-    icon: ShareIcon,
-    name: "Share",
-    execute: () => { return; }
+    component: ToggleFavoriteAction,
+    execute: (dispatch, resource) => {
+        dispatch<any>(toggleFavorite(resource));
+    }
 }]];