const { classes, checkedList, resources, selectedUuid, favorites } = props;
const currentResourceKinds = Array.from(selectedToKindSet(checkedList));
- const buttons = selectedToKindSet(checkedList).size
- ? selectActionsByKind(currentResourceKinds, multiselectActionsFilters) : []
+ const currentPathIsTrash = window.location.pathname === "/trash";
+
+ const buttons =
+ currentPathIsTrash && selectedToKindSet(checkedList).size
+ ? [msToggleTrashAction]
+ : selectActionsByKind(currentResourceKinds, multiselectActionsFilters);
-console.log(buttons)
return (
<React.Fragment>
<Toolbar
};
};
-const mapDispatchToProps = dispatchFn => {
+const mapDispatchToProps = () => {
return (dispatch: Dispatch, { id, onRowClick, onRowDoubleClick, onContextMenu }: Props) => ({
onSetColumns: (columns: DataColumns<any, any>) => {
dispatch(dataExplorerActions.SET_COLUMNS({ id, columns }));
import { AddFavoriteIcon, RemoveFavoriteIcon } from "components/icon/icon";
import { RestoreFromTrashIcon, TrashIcon } from "components/icon/icon";
import { getResource } from "store/resources/resources";
-import { ContextMenuResource } from "store/context-menu/context-menu-actions";
import { checkFavorite } from "store/favorites/favorites-reducer";
export const msToggleFavoriteAction = {