15088: Adds routing for link-account panel
[arvados-workbench2.git] / src / views / my-account-panel / my-account-panel.tsx
index bd1f58745724b9dbd0a87eb083d31c0dd48fe135..85f285d60f208798eaafafae226a9c15a7f2b6a4 100644 (file)
@@ -3,11 +3,12 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { RootState } from '~/store/store';
+import { Dispatch } from 'redux';
 import { compose } from 'redux';
 import { reduxForm, isPristine, isValid } from 'redux-form';
 import { connect } from 'react-redux';
-import { saveEditedUser } from '~/store/my-account/my-account-panel-actions';
-import { MyAccountPanelRoot, MyAccountPanelRootDataProps } from '~/views/my-account-panel/my-account-panel-root';
+import { saveEditedUser, openLinkAccount } from '~/store/my-account/my-account-panel-actions';
+import { MyAccountPanelRoot, MyAccountPanelRootDataProps, MyAccountPanelRootActionProps } from '~/views/my-account-panel/my-account-panel-root';
 import { MY_ACCOUNT_FORM } from "~/store/my-account/my-account-panel-actions";
 
 const mapStateToProps = (state: RootState): MyAccountPanelRootDataProps => ({
@@ -17,8 +18,12 @@ const mapStateToProps = (state: RootState): MyAccountPanelRootDataProps => ({
     localCluster: state.auth.localCluster
 });
 
+const mapDispatchToProps = (dispatch: Dispatch): MyAccountPanelRootActionProps => ({
+    openLinkAccount: () => dispatch<any>(openLinkAccount())
+});
+
 export const MyAccountPanel = compose(
-    connect(mapStateToProps),
+    connect(mapStateToProps, mapDispatchToProps),
     reduxForm({
         form: MY_ACCOUNT_FORM,
         onSubmit: (data, dispatch) => {