From 89ed621c9c1ece699f0f1c6b4ebe2549b189b41c Mon Sep 17 00:00:00 2001 From: Abhas Kumar Date: Tue, 26 Dec 2023 03:47:15 +0530 Subject: [PATCH] improve optional and nullish chaining --- src/components/MoneyReportHeader.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index b50ac1516400..0c60b033bca7 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -87,7 +87,7 @@ function MoneyReportHeader({session, personalDetails, policy, chatReport, nextSt const shouldShowAnyButton = shouldShowSettlementButton || shouldShowApproveButton || shouldShowSubmitButton || shouldShowNextSteps; const bankAccountRoute = ReportUtils.getBankAccountRoute(chatReport); const formattedAmount = CurrencyUtils.convertToDisplayString(reimbursableTotal, moneyRequestReport.currency); - const isMoreContentShown = shouldShowNextSteps || (shouldShowAnyButton && isSmallScreenWidth); + const isMoreContentShown = shouldShowNextSteps ?? (shouldShowAnyButton && isSmallScreenWidth); const threeDotsMenuItems = [HeaderUtils.getPinMenuItem(moneyRequestReport)]; if (isPayer && isSettled) { @@ -136,7 +136,7 @@ function MoneyReportHeader({session, personalDetails, policy, chatReport, nextSt IOU.payMoneyRequest(paymentType, chatReport, moneyRequestReport)} enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS} @@ -152,7 +152,7 @@ function MoneyReportHeader({session, personalDetails, policy, chatReport, nextSt