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 { navigateTo } from '~/store/navigation/navigation-action';
8 import { WorkflowPanelView } from '~/views/workflow-panel/workflow-panel-view';
9 import { WorfklowPanelActionProps, WorkflowPanelDataProps } from './workflow-panel-view';
10 import { showWorkflowDetails, getWorkflowDetails } from '~/store/workflow-panel/workflow-panel-actions';
11 import { RootState } from '~/store/store';
13 const mapStateToProps = (state: RootState): WorkflowPanelDataProps => ({
14 workflow: getWorkflowDetails(state)
17 const mapDispatchToProps = (dispatch: Dispatch): WorfklowPanelActionProps => ({
18 handleRowDoubleClick: (uuid: string) => {
19 dispatch<any>(navigateTo(uuid));
22 handleRowClick: (uuid: string) => {
23 dispatch(showWorkflowDetails(uuid));
27 export const WorkflowPanel = connect(mapStateToProps, mapDispatchToProps)(WorkflowPanelView);