Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BrtqKr committed May 22, 2024
1 parent 3c619d0 commit 44c1473
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/components/MoneyRequestHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ type MoneyRequestHeaderProps = MoneyRequestHeaderOnyxProps & {

/** Method to trigger when pressing close button of the header */
onBackButtonPress: () => void;

/** The reportID of the transaction thread report associated with this current report, if any */
transactionThreadReportID?: string | null;
};

function MoneyRequestHeader({
Expand All @@ -82,7 +79,6 @@ function MoneyRequestHeader({
policy,
shouldUseNarrowLayout = false,
onBackButtonPress,
transactionThreadReportID,
}: MoneyRequestHeaderProps) {
const styles = useThemeStyles();
const theme = useTheme();
Expand Down Expand Up @@ -117,8 +113,8 @@ function MoneyRequestHeader({
}, [parentReport?.reportID, parentReportAction, setIsDeleteModalVisible]);

const markAsCash = useCallback(() => {
TransactionActions.markAsCash(transaction?.transactionID ?? '', transactionThreadReportID ?? '');
}, [transaction?.transactionID, transactionThreadReportID]);
TransactionActions.markAsCash(transaction?.transactionID ?? '', report.reportID);
}, [report.reportID, transaction?.transactionID]);

const isScanning = TransactionUtils.hasReceipt(transaction) && TransactionUtils.isReceiptBeingScanned(transaction);

Expand Down
1 change: 0 additions & 1 deletion src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ function ReportScreen({
parentReportAction={parentReportAction}
shouldUseNarrowLayout={shouldUseNarrowLayout}
onBackButtonPress={onBackButtonPress}
transactionThreadReportID={transactionThreadReportID}
/>
);
}
Expand Down

0 comments on commit 44c1473

Please sign in to comment.