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 => ({
19 handleRowDoubleClick: (uuid: string) => {
20 dispatch<any>(navigateTo(uuid));
23 handleRowClick: (uuid: string) => {
24 dispatch(showWorkflowDetails(uuid));
28 export const WorkflowPanel = connect(mapStateToProps, mapDispatchToProps)(WorkflowPanelView);