1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { Dispatch } from "redux";
6 import { connect } from "react-redux";
7 import { RootState } from 'store/store';
10 resourceUuidToContextMenuKind
11 } from 'store/context-menu/context-menu-actions';
14 LinkPanelRootActionProps,
15 LinkPanelRootDataProps
16 } from 'views/link-panel/link-panel-root';
17 import { ResourceKind } from 'models/resource';
19 const mapStateToProps = (state: RootState): LinkPanelRootDataProps => {
21 resources: state.resources
25 const mapDispatchToProps = (dispatch: Dispatch): LinkPanelRootActionProps => ({
26 onContextMenu: (event, resourceUuid) => {
27 const kind = dispatch<any>(resourceUuidToContextMenuKind(resourceUuid));
29 dispatch<any>(openContextMenu(event, {
33 kind: ResourceKind.LINK,
38 onItemClick: (resourceUuid: string) => { return; },
39 onItemDoubleClick: uuid => { return; }
42 export const LinkPanel = connect(mapStateToProps, mapDispatchToProps)(LinkPanelRoot);