Skip to content

Commit

Permalink
Merge pull request #32465 from dukenv0307/fix/31363
Browse files Browse the repository at this point in the history
using isLoadingApp instead of isLoadingReportData
  • Loading branch information
Joel Bettner authored Dec 11, 2023
2 parents eebd7ee + adf23f7 commit 298d9d2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/pages/ReimbursementAccount/ReimbursementAccountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const propTypes = {
name: PropTypes.string,
}),

/** Indicated whether the report data is loading */
isLoadingReportData: PropTypes.bool,
/** Indicated whether the app is loading */
isLoadingApp: PropTypes.bool,

/** Holds information about the users account that is logging in */
account: PropTypes.shape({
Expand Down Expand Up @@ -89,7 +89,7 @@ const defaultProps = {
policy: {},
plaidLinkToken: '',
plaidCurrentEvent: '',
isLoadingReportData: false,
isLoadingApp: false,
account: {},
session: {
email: null,
Expand Down Expand Up @@ -158,7 +158,7 @@ function getRouteForCurrentStep(currentStep) {
}
}

function ReimbursementAccountPage({reimbursementAccount, route, onfidoToken, policy, account, isLoadingReportData, session, plaidLinkToken, plaidCurrentEvent, reimbursementAccountDraft}) {
function ReimbursementAccountPage({reimbursementAccount, route, onfidoToken, policy, account, isLoadingApp, session, plaidLinkToken, plaidCurrentEvent, reimbursementAccountDraft}) {
/**
The SetupWithdrawalAccount flow allows us to continue the flow from various points depending on where the
user left off. This view will refer to the achData as the single source of truth to determine which route to
Expand Down Expand Up @@ -409,7 +409,7 @@ function ReimbursementAccountPage({reimbursementAccount, route, onfidoToken, pol
);
}

const isLoading = (isLoadingReportData || account.isLoading || reimbursementAccount.isLoading) && (!plaidCurrentEvent || plaidCurrentEvent === CONST.BANK_ACCOUNT.PLAID.EVENTS_NAME.EXIT);
const isLoading = (isLoadingApp || account.isLoading || reimbursementAccount.isLoading) && (!plaidCurrentEvent || plaidCurrentEvent === CONST.BANK_ACCOUNT.PLAID.EVENTS_NAME.EXIT);
const shouldShowOfflineLoader = !(
isOffline && _.contains([CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT, CONST.BANK_ACCOUNT.STEP.COMPANY, CONST.BANK_ACCOUNT.STEP.REQUESTOR, CONST.BANK_ACCOUNT.STEP.ACH_CONTRACT], currentStep)
);
Expand Down Expand Up @@ -565,8 +565,8 @@ export default compose(
onfidoToken: {
key: ONYXKEYS.ONFIDO_TOKEN,
},
isLoadingReportData: {
key: ONYXKEYS.IS_LOADING_REPORT_DATA,
isLoadingApp: {
key: ONYXKEYS.IS_LOADING_APP,
},
account: {
key: ONYXKEYS.ACCOUNT,
Expand Down

0 comments on commit 298d9d2

Please sign in to comment.