Skip to content

Commit 84a6228

Browse files
committed
Remove openParentReportInCurrentTab prop from MoneyRequestHeader
1 parent 7ba8e6c commit 84a6228

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/components/MoneyRequestHeader.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,9 @@ type MoneyRequestHeaderProps = {
6161

6262
/** Method to trigger when pressing close button of the header */
6363
onBackButtonPress: () => void;
64-
65-
/** Whether to open the parent report in the current tab if possible */
66-
openParentReportInCurrentTab?: boolean;
6764
};
6865

69-
function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPress, openParentReportInCurrentTab}: MoneyRequestHeaderProps) {
66+
function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPress}: MoneyRequestHeaderProps) {
7067
// We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to use a correct layout for the hold expense modal https://github.com/Expensify/App/pull/47990#issuecomment-2362382026
7168
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
7269
const {shouldUseNarrowLayout, isSmallScreenWidth} = useResponsiveLayout();
@@ -257,7 +254,7 @@ function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPre
257254
shouldDisplayHelpButton={!isReportInRHP}
258255
onBackButtonPress={onBackButtonPress}
259256
shouldEnableDetailPageNavigation
260-
openParentReportInCurrentTab={openParentReportInCurrentTab}
257+
openParentReportInCurrentTab
261258
>
262259
{!shouldUseNarrowLayout && (
263260
<View style={[styles.flexRow, styles.gap2]}>

src/components/ParentNavigationSubtitle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function ParentNavigationSubtitle({
4646
const styles = useThemeStyles();
4747
const {workspaceName, reportName} = parentNavigationSubtitleData;
4848
const {translate} = useLocalize();
49-
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`);
49+
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`, {canBeMissing: false});
5050
const canUserPerformWriteAction = canUserPerformWriteActionReportUtils(report);
5151
const isReportInRHP = currentRoute.name === SCREENS.SEARCH.REPORT_RHP;
5252
const currentFullScreenRoute = useRootNavigationState((state) => state?.routes?.findLast((route) => isFullScreenName(route.name)));

src/pages/home/ReportScreen.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ function ReportScreen({route, navigation}: ReportScreenProps) {
352352
policy={policy}
353353
parentReportAction={parentReportAction}
354354
onBackButtonPress={onBackButtonPress}
355-
openParentReportInCurrentTab
356355
/>
357356
);
358357
}

0 commit comments

Comments
 (0)