1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet } from '../context-menu-action-set';
6 import { ToggleFavoriteAction } from '../actions/favorite-action';
7 import { toggleFavorite } from 'store/favorites/favorites-actions';
8 import { favoritePanelActions } from 'store/favorite-panel/favorite-panel-action';
10 export const favoriteActionSet: ContextMenuActionSet = [
13 component: ToggleFavoriteAction,
14 execute: (dispatch, resources) => {
15 resources.forEach((resource) =>
16 dispatch<any>(toggleFavorite(resource)).then(() => {
17 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());