From 1f718264884948a1e092fe7678f43acd0e1ca517 Mon Sep 17 00:00:00 2001 From: dmkt9 Date: Fri, 9 May 2025 10:55:23 +0700 Subject: [PATCH 1/2] fix header displays 'expense' after deleting --- src/components/AvatarWithDisplayName.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/AvatarWithDisplayName.tsx b/src/components/AvatarWithDisplayName.tsx index 1de01ad5a01a..5d59da0ab551 100644 --- a/src/components/AvatarWithDisplayName.tsx +++ b/src/components/AvatarWithDisplayName.tsx @@ -168,7 +168,8 @@ function AvatarWithDisplayName({ {canBeMissing: true}, ); const [reportAttributes] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {selector: (attributes) => attributes?.reports, canBeMissing: false}); - const title = getReportName(report, undefined, undefined, undefined, invoiceReceiverPolicy, reportAttributes); + const parentReportActionParam = report?.parentReportActionID ? parentReportActions?.[report.parentReportActionID] : undefined; + const title = getReportName(report, undefined, parentReportActionParam, undefined, invoiceReceiverPolicy, reportAttributes); const subtitle = getChatRoomSubtitle(report, {isCreateExpenseFlow: true}); const parentNavigationSubtitleData = getParentNavigationSubtitle(report); const isMoneyRequestOrReport = isMoneyRequestReport(report) || isMoneyRequest(report) || isTrackExpenseReport(report) || isInvoiceReport(report); From ef498f543bd2996be9672a031cc72bbdf4cae941 Mon Sep 17 00:00:00 2001 From: dmkt9 Date: Thu, 15 May 2025 16:41:08 +0700 Subject: [PATCH 2/2] fix prettier --- src/components/AvatarWithDisplayName.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AvatarWithDisplayName.tsx b/src/components/AvatarWithDisplayName.tsx index 5d59da0ab551..6530267b68a2 100644 --- a/src/components/AvatarWithDisplayName.tsx +++ b/src/components/AvatarWithDisplayName.tsx @@ -168,7 +168,7 @@ function AvatarWithDisplayName({ {canBeMissing: true}, ); const [reportAttributes] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {selector: (attributes) => attributes?.reports, canBeMissing: false}); - const parentReportActionParam = report?.parentReportActionID ? parentReportActions?.[report.parentReportActionID] : undefined; + const parentReportActionParam = report?.parentReportActionID ? parentReportActions?.[report.parentReportActionID] : undefined; const title = getReportName(report, undefined, parentReportActionParam, undefined, invoiceReceiverPolicy, reportAttributes); const subtitle = getChatRoomSubtitle(report, {isCreateExpenseFlow: true}); const parentNavigationSubtitleData = getParentNavigationSubtitle(report);