From 24cc808e44765268ddbcecbfed0645b09fe7777d Mon Sep 17 00:00:00 2001 From: Eric Biagiotti Date: Wed, 8 May 2019 17:10:48 -0400 Subject: [PATCH] 15088: Function name clarification Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti --- .../link-account-panel/link-account-panel-actions.ts | 2 +- src/views/inactive-panel/inactive-panel.tsx | 10 +++++----- .../link-account-panel/link-account-panel-root.tsx | 8 ++++---- src/views/link-account-panel/link-account-panel.tsx | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/store/link-account-panel/link-account-panel-actions.ts b/src/store/link-account-panel/link-account-panel-actions.ts index 54657377..c175e604 100644 --- a/src/store/link-account-panel/link-account-panel-actions.ts +++ b/src/store/link-account-panel/link-account-panel-actions.ts @@ -147,7 +147,7 @@ export const loadLinkAccountPanel = () => } }; -export const saveAccountLinkData = (t: LinkAccountType) => +export const startLinking = (t: LinkAccountType) => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { const accountToLink = {type: t, userUuid: services.authService.getUuid(), token: services.authService.getApiToken()} as AccountToLink; services.linkAccountService.saveToSession(accountToLink); diff --git a/src/views/inactive-panel/inactive-panel.tsx b/src/views/inactive-panel/inactive-panel.tsx index 25e03b85..5f045f69 100644 --- a/src/views/inactive-panel/inactive-panel.tsx +++ b/src/views/inactive-panel/inactive-panel.tsx @@ -5,7 +5,7 @@ import * as React from 'react'; import { Dispatch } from 'redux'; import { connect } from 'react-redux'; -import { saveAccountLinkData } from '~/store/link-account-panel/link-account-panel-actions'; +import { startLinking } from '~/store/link-account-panel/link-account-panel-actions'; import { Grid, Typography, Button } from '@material-ui/core'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; import { ArvadosTheme } from '~/common/custom-theme'; @@ -39,16 +39,16 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }); export interface InactivePanelActionProps { - linkAccount: () => void; + startLinking: () => void; } const mapDispatchToProps = (dispatch: Dispatch): InactivePanelActionProps => ({ - linkAccount: () => dispatch(saveAccountLinkData(LinkAccountType.ACCESS_OTHER_ACCOUNT)) + startLinking: () => dispatch(startLinking(LinkAccountType.ACCESS_OTHER_ACCOUNT)) }); type InactivePanelProps = WithStyles & InactivePanelActionProps; -export const InactivePanel = connect(null, mapDispatchToProps)(withStyles(styles)((({ classes, linkAccount }: InactivePanelProps) => +export const InactivePanel = connect(null, mapDispatchToProps)(withStyles(styles)((({ classes, startLinking }: InactivePanelProps) => @@ -68,7 +68,7 @@ export const InactivePanel = connect(null, mapDispatchToProps)(withStyles(styles - diff --git a/src/views/link-account-panel/link-account-panel-root.tsx b/src/views/link-account-panel/link-account-panel-root.tsx index 50a8b7ca..2439cc92 100644 --- a/src/views/link-account-panel/link-account-panel-root.tsx +++ b/src/views/link-account-panel/link-account-panel-root.tsx @@ -35,7 +35,7 @@ export interface LinkAccountPanelRootDataProps { } export interface LinkAccountPanelRootActionProps { - saveAccountLinkData: (type: LinkAccountType) => void; + startLinking: (type: LinkAccountType) => void; cancelLinking: () => void; linkAccount: () => void; } @@ -52,7 +52,7 @@ function displayUser(user: UserResource, showCreatedAt: boolean = false) { type LinkAccountPanelRootProps = LinkAccountPanelRootDataProps & LinkAccountPanelRootActionProps & WithStyles; export const LinkAccountPanelRoot = withStyles(styles) ( - ({classes, targetUser, userToLink, status, error, saveAccountLinkData, cancelLinking, linkAccount}: LinkAccountPanelRootProps) => { + ({classes, targetUser, userToLink, status, error, startLinking, cancelLinking, linkAccount}: LinkAccountPanelRootProps) => { return { status === LinkAccountPanelStatus.INITIAL && targetUser && @@ -67,12 +67,12 @@ export const LinkAccountPanelRoot = withStyles(styles) ( - - diff --git a/src/views/link-account-panel/link-account-panel.tsx b/src/views/link-account-panel/link-account-panel.tsx index 45045a3b..f620b568 100644 --- a/src/views/link-account-panel/link-account-panel.tsx +++ b/src/views/link-account-panel/link-account-panel.tsx @@ -5,7 +5,7 @@ import { RootState } from '~/store/store'; import { Dispatch } from 'redux'; import { connect } from 'react-redux'; -import { saveAccountLinkData, cancelLinking, linkAccount } 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, @@ -23,7 +23,7 @@ const mapStateToProps = (state: RootState): LinkAccountPanelRootDataProps => { }; const mapDispatchToProps = (dispatch: Dispatch): LinkAccountPanelRootActionProps => ({ - saveAccountLinkData: (type: LinkAccountType) => dispatch(saveAccountLinkData(type)), + startLinking: (type: LinkAccountType) => dispatch(startLinking(type)), cancelLinking: () => dispatch(cancelLinking()), linkAccount: () => dispatch(linkAccount()) }); -- 2.30.2