Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using isLoadingApp instead of isLoadingReportData #32465

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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