diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 81d4af93d86c..01ab3b849a0b 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -397,18 +397,6 @@ function ReimbursementAccountPage({reimbursementAccount, route, onfidoToken, pol } }; - if (_.isEmpty(policy) || !PolicyUtils.isPolicyAdmin(policy)) { - return ( - - Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)} - subtitleKey={_.isEmpty(policy) ? undefined : 'workspace.common.notAuthorized'} - /> - - ); - } - 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) @@ -427,6 +415,18 @@ function ReimbursementAccountPage({reimbursementAccount, route, onfidoToken, pol ); } + if (!isLoading && (_.isEmpty(policy) || !PolicyUtils.isPolicyAdmin(policy))) { + return ( + + Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)} + subtitleKey={_.isEmpty(policy) ? undefined : 'workspace.common.notAuthorized'} + /> + + ); + } + let errorText; const userHasPhonePrimaryEmail = Str.endsWith(session.email, CONST.SMS.DOMAIN); const throttledDate = lodashGet(reimbursementAccount, 'throttledDate', '');