Merge branch '13784-add-to-favorite'
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / project-action-set.ts
index 9a1b1d5b12907d3115859aefa0abdc49727f2333..e0a5e5412616a8690df6e5de1184e46cf201a275 100644 (file)
@@ -3,17 +3,20 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
-import actions from "../../../store/project/project-action";
-import { IconTypes } from "../../../components/icon/icon";
+import { projectActions } from "../../../store/project/project-action";
+import { NewProjectIcon } from "../../../components/icon/icon";
+import { ToggleFavoriteAction } from "./favorite-action";
+import { toggleFavorite } from "../../../store/favorites/favorites-actions";
 
 export const projectActionSet: ContextMenuActionSet = [[{
-    icon: IconTypes.FOLDER,
+    icon: NewProjectIcon,
     name: "New project",
     execute: (dispatch, resource) => {
-        dispatch(actions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
+        dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
     }
 }, {
-    icon: IconTypes.ANNOUNCEMENT,
-    name: "Share",
-    execute: () => { return; }
-}]];
\ No newline at end of file
+    component: ToggleFavoriteAction,
+    execute: (dispatch, resource) => {
+        dispatch<any>(toggleFavorite(resource));
+    }
+}]];