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';
8 import { RunProcessPanelRootDataProps, RunProcessPanelRootActionProps, RunProcessPanelRoot } from '~/views/run-process-panel/run-process-panel-root';
9 import { goToStep } from '~/store/run-process-panel/run-process-panel-actions';
11 const mapStateToProps = ({ runProcessPanel }: RootState): RunProcessPanelRootDataProps => {
13 currentStep: runProcessPanel.currentStep
17 const mapDispatchToProps = (dispatch: Dispatch): RunProcessPanelRootActionProps => ({
18 onSetStep: (step: number) => {
19 dispatch<any>(goToStep(step));
23 export const RunProcessPanel = connect(mapStateToProps, mapDispatchToProps)(RunProcessPanelRoot);