Skip to content

Commit

Permalink
Merge pull request #37913 from Expensify/tgolen-refactor-sideloading-…
Browse files Browse the repository at this point in the history
…headerview
  • Loading branch information
blimpich authored Mar 13, 2024
2 parents 86200bb + e3e8073 commit 37a2dbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/home/HeaderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<OnyxTypes.ReportAction>;

/** 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();
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ function ReportScreen({
reportID={reportID}
onNavigationMenuButtonClicked={goBack}
report={report}
parentReportAction={parentReportAction}
/>
);

Expand Down

0 comments on commit 37a2dbb

Please sign in to comment.