15088: Function name clarification
[arvados-workbench2.git] / src / views / link-account-panel / link-account-panel.tsx
index 491f2055a82b95f28e6da8479920b4e23f675970..f620b5689e375f9552642d367cee85c98c5e5455 100644 (file)
@@ -5,7 +5,7 @@
 import { RootState } from '~/store/store';
 import { Dispatch } from 'redux';
 import { connect } from 'react-redux';
-import { saveAccountLinkData } from '~/store/link-account-panel/link-account-panel-actions';
+import { startLinking, cancelLinking, linkAccount } from '~/store/link-account-panel/link-account-panel-actions';
 import { LinkAccountType } from '~/models/link-account';
 import {
     LinkAccountPanelRoot,
@@ -15,13 +15,17 @@ import {
 
 const mapStateToProps = (state: RootState): LinkAccountPanelRootDataProps => {
     return {
-        user: state.auth.user,
-        accountToLink: state.linkAccountPanel.accountToLink
+        targetUser: state.linkAccountPanel.targetUser,
+        userToLink: state.linkAccountPanel.userToLink,
+        status: state.linkAccountPanel.status,
+        error: state.linkAccountPanel.error
     };
 };
 
 const mapDispatchToProps = (dispatch: Dispatch): LinkAccountPanelRootActionProps => ({
-    saveAccountLinkData: (type: LinkAccountType) => dispatch<any>(saveAccountLinkData(type))
+    startLinking: (type: LinkAccountType) => dispatch<any>(startLinking(type)),
+    cancelLinking: () => dispatch<any>(cancelLinking()),
+    linkAccount: () => dispatch<any>(linkAccount())
 });
 
 export const LinkAccountPanel = connect(mapStateToProps, mapDispatchToProps)(LinkAccountPanelRoot);