prepare structure and init stepper
[arvados-workbench2.git] / src / views / run-process-panel / run-process-panel.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
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';
10
11 const mapStateToProps = ({ runProcessPanel }: RootState): RunProcessPanelRootDataProps => {
12    return {
13        currentStep: runProcessPanel.currentStep
14    };
15 };
16
17 const mapDispatchToProps = (dispatch: Dispatch): RunProcessPanelRootActionProps => ({
18     onClick: (step: number) => {
19         dispatch<any>(goToStep(step));
20     }
21 });
22
23 export const RunProcessPanel = connect(mapStateToProps, mapDispatchToProps)(RunProcessPanelRoot);