From 01a9daad5c2b56c5461cc6eaccd7bb6b6aaf7aef Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Mon, 14 Oct 2024 14:46:50 +0700 Subject: [PATCH] fix: add default value to isFromReviewDuplicates --- src/ROUTES.ts | 2 +- src/components/ReportActionItem/MoneyRequestView.tsx | 2 +- src/components/ReportActionItem/ReportActionItemImage.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ROUTES.ts b/src/ROUTES.ts index de675fa8b3bf..c318ff8834d9 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -1177,7 +1177,7 @@ const ROUTES = { TRANSACTION_RECEIPT: { route: 'r/:reportID/transaction/:transactionID/receipt', getRoute: (reportID: string, transactionID: string, readonly = false, isFromReviewDuplicates = false) => - `r/${reportID}/transaction/${transactionID}/receipt${readonly ? '?readonly=true' : ''}${isFromReviewDuplicates ? '&isFromReviewDuplicates=true' : ''}` as const, + `r/${reportID}/transaction/${transactionID}/receipt?readonly=${readonly}${isFromReviewDuplicates ? '&isFromReviewDuplicates=true' : ''}` as const, }, TRANSACTION_DUPLICATE_REVIEW_PAGE: { diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 4af17b194d26..2d4f44c35c93 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -77,7 +77,7 @@ const getTransactionID = (report: OnyxEntry, parentReportActio return originalMessage?.IOUTransactionID ?? -1; }; -function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = false, updatedTransaction, isFromReviewDuplicates}: MoneyRequestViewProps) { +function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = false, updatedTransaction, isFromReviewDuplicates = false}: MoneyRequestViewProps) { const theme = useTheme(); const styles = useThemeStyles(); const session = useSession(); diff --git a/src/components/ReportActionItem/ReportActionItemImage.tsx b/src/components/ReportActionItem/ReportActionItemImage.tsx index c140222517c5..794902b67856 100644 --- a/src/components/ReportActionItem/ReportActionItemImage.tsx +++ b/src/components/ReportActionItem/ReportActionItemImage.tsx @@ -77,7 +77,7 @@ function ReportActionItemImage({ isSingleImage = true, readonly = false, shouldMapHaveBorderRadius, - isFromReviewDuplicates, + isFromReviewDuplicates = false, }: ReportActionItemImageProps) { const styles = useThemeStyles(); const {translate} = useLocalize();