X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/090f4825bdd30925a10c6df1b9493df0c2e8f541..cfe5ff035578ede95613b0c545708466da78cbea:/src/views/link-panel/link-panel.tsx diff --git a/src/views/link-panel/link-panel.tsx b/src/views/link-panel/link-panel.tsx index 2c3bf758..b66aafb2 100644 --- a/src/views/link-panel/link-panel.tsx +++ b/src/views/link-panel/link-panel.tsx @@ -4,20 +4,27 @@ import { Dispatch } from "redux"; import { connect } from "react-redux"; -import { RootState } from '~/store/store'; -import { openContextMenu, resourceKindToContextMenuKind } from '~/store/context-menu/context-menu-actions'; -import { LinkPanelRoot, LinkPanelActionProps } from '~/views/link-panel/link-panel-root'; -import { ResourceKind } from '~/models/resource'; +import { RootState } from 'store/store'; +import { + openContextMenu, + resourceUuidToContextMenuKind +} from 'store/context-menu/context-menu-actions'; +import { + LinkPanelRoot, + LinkPanelRootActionProps, + LinkPanelRootDataProps +} from 'views/link-panel/link-panel-root'; +import { ResourceKind } from 'models/resource'; -const mapStateToProps = (state: RootState) => { +const mapStateToProps = (state: RootState): LinkPanelRootDataProps => { return { resources: state.resources }; }; -const mapDispatchToProps = (dispatch: Dispatch): LinkPanelActionProps => ({ +const mapDispatchToProps = (dispatch: Dispatch): LinkPanelRootActionProps => ({ onContextMenu: (event, resourceUuid) => { - const kind = resourceKindToContextMenuKind(resourceUuid); + const kind = dispatch(resourceUuidToContextMenuKind(resourceUuid)); if (kind) { dispatch(openContextMenu(event, { name: '',