X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b6a5b173cd4e9f325f371d26204dfe156d911c20..232eac919b067a3783348eab549c9fc555b80abd:/src/views-components/context-menu/action-sets/project-action-set.ts diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts index 66dbd4d1..df298e4b 100644 --- a/src/views-components/context-menu/action-sets/project-action-set.ts +++ b/src/views-components/context-menu/action-sets/project-action-set.ts @@ -4,7 +4,10 @@ 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 "../actions/favorite-action"; +import { toggleFavorite } from "../../../store/favorites/favorites-actions"; +import { favoritePanelActions } from "../../../store/favorite-panel/favorite-panel-action"; export const projectActionSet: ContextMenuActionSet = [[{ icon: NewProjectIcon, @@ -13,7 +16,10 @@ export const projectActionSet: ContextMenuActionSet = [[{ dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid })); } }, { - icon: ShareIcon, - name: "Share", - execute: () => { return; } + component: ToggleFavoriteAction, + execute: (dispatch, resource) => { + dispatch(toggleFavorite(resource)).then(() => { + dispatch(favoritePanelActions.REQUEST_ITEMS()); + }); + } }]];