diff --git a/src/pages/home/HeaderView.tsx b/src/pages/home/HeaderView.tsx index ad3c40666e76..8e0aefc39257 100644 --- a/src/pages/home/HeaderView.tsx +++ b/src/pages/home/HeaderView.tsx @@ -63,11 +63,14 @@ type HeaderViewProps = HeaderViewOnyxProps & { /** The report currently being looked at */ report: OnyxTypes.Report; + /** The report action the transaction is tied to from the parent report */ + parentReportAction: OnyxEntry; + /** The reportID of the request */ reportID: string; }; -function HeaderView({report, personalDetails, parentReport, policy, session, reportID, guideCalendarLink, onNavigationMenuButtonClicked}: HeaderViewProps) { +function HeaderView({report, personalDetails, parentReport, parentReportAction, policy, session, reportID, guideCalendarLink, onNavigationMenuButtonClicked}: HeaderViewProps) { const [isDeleteTaskConfirmModalVisible, setIsDeleteTaskConfirmModalVisible] = React.useState(false); const {isSmallScreenWidth, windowWidth} = useWindowDimensions(); const {translate} = useLocalize(); @@ -90,7 +93,6 @@ function HeaderView({report, personalDetails, parentReport, policy, session, rep const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData); const parentNavigationSubtitleData = ReportUtils.getParentNavigationSubtitle(reportHeaderData); const isConcierge = ReportUtils.hasSingleParticipant(report) && participants.includes(CONST.ACCOUNT_ID.CONCIERGE); - const parentReportAction = ReportActionsUtils.getParentReportAction(report); const isCanceledTaskReport = ReportUtils.isCanceledTaskReport(report, parentReportAction); const isWhisperAction = ReportActionsUtils.isWhisperAction(parentReportAction); const isUserCreatedPolicyRoom = ReportUtils.isUserCreatedPolicyRoom(report); diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index ab09047ede68..6c3f0812214d 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -263,6 +263,7 @@ function ReportScreen({ reportID={reportID} onNavigationMenuButtonClicked={goBack} report={report} + parentReportAction={parentReportAction} /> );