From f8b21f6a985846c709a46ebd872382ffec00521b Mon Sep 17 00:00:00 2001 From: Jack Senyitko Date: Tue, 17 Mar 2026 11:08:23 -0400 Subject: [PATCH 1/9] add a memoized component --- .../MoneyRequestReportPreviewContent.tsx | 220 +++++++++--------- 1 file changed, 115 insertions(+), 105 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx index c6ca35b4f9150..d947e30b01d93 100644 --- a/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx @@ -743,111 +743,121 @@ function MoneyRequestReportPreviewContent({ const isReportDeleted = action?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; const formattedAmount = getTotalAmountForIOUReportPreviewButton(iouReport, policy, reportPreviewAction); - const reportPreviewActions = { - [CONST.REPORT.REPORT_PREVIEW_ACTIONS.SUBMIT]: ( - { - if (hasDynamicExternalWorkflow(policy) && !isDEWBetaEnabled) { - showDEWModal(); - return; - } - startSubmittingAnimation(); - submitReport( - iouReport, - policy, - currentUserAccountID, - currentUserEmail, - hasViolations, - isASAPSubmitBetaEnabled, - iouReportNextStep, - userBillingGraceEndPeriods, - amountOwed, - ); - }} - isSubmittingAnimationRunning={isSubmittingAnimationRunning} - onAnimationFinish={stopAnimation} - sentryLabel={CONST.SENTRY_LABEL.REPORT_PREVIEW.SUBMIT_BUTTON} - /> - ), - [CONST.REPORT.REPORT_PREVIEW_ACTIONS.APPROVE]: ( -