@@ -4,7 +4,6 @@ import {ActivityIndicator, InteractionManager, View} from 'react-native';
44import type { OnyxEntry } from 'react-native-onyx' ;
55import { useOnyx } from 'react-native-onyx' ;
66import type { ValueOf } from 'type-fest' ;
7- import useActiveRoute from '@hooks/useActiveRoute' ;
87import useLocalize from '@hooks/useLocalize' ;
98import useMobileSelectionMode from '@hooks/useMobileSelectionMode' ;
109import useNetwork from '@hooks/useNetwork' ;
@@ -43,7 +42,6 @@ import {
4342 isInvoiceReport as isInvoiceReportUtil ,
4443 isProcessingReport ,
4544 isReportOwner ,
46- isTrackExpenseReport as isTrackExpenseReportUtil ,
4745 navigateOnDeleteExpense ,
4846 navigateToDetailsPage ,
4947 reportTransactionsSelector ,
@@ -154,7 +152,6 @@ function MoneyReportHeader({
154152 const { shouldUseNarrowLayout, isSmallScreenWidth, isMediumScreenWidth} = useResponsiveLayout ( ) ;
155153 const shouldDisplayNarrowVersion = shouldUseNarrowLayout || isMediumScreenWidth ;
156154 const route = useRoute ( ) ;
157- const { getReportRHPActiveRoute} = useActiveRoute ( ) ;
158155 // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
159156 const [ chatReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ moneyRequestReport ?. chatReportID } ` , { canBeMissing : true } ) ;
160157 // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
@@ -249,18 +246,6 @@ function MoneyReportHeader({
249246 ) ;
250247
251248 const isInvoiceReport = isInvoiceReportUtil ( moneyRequestReport ) ;
252- const isTrackExpenseReport = isTrackExpenseReportUtil ( moneyRequestReport ) ;
253-
254- const iouType = useMemo ( ( ) => {
255- if ( isTrackExpenseReport ) {
256- return CONST . IOU . TYPE . TRACK ;
257- }
258- if ( isInvoiceReport ) {
259- return CONST . IOU . TYPE . INVOICE ;
260- }
261-
262- return CONST . IOU . TYPE . SUBMIT ;
263- } , [ isTrackExpenseReport , isInvoiceReport ] ) ;
264249
265250 const [ isDownloadErrorModalVisible , setIsDownloadErrorModalVisible ] = useState ( false ) ;
266251
@@ -807,20 +792,6 @@ function MoneyReportHeader({
807792 Navigation . navigate ( ROUTES . REPORT_WITH_ID_CHANGE_WORKSPACE . getRoute ( moneyRequestReport . reportID ) ) ;
808793 } ,
809794 } ,
810- [ CONST . REPORT . SECONDARY_ACTIONS . MOVE_EXPENSE ] : {
811- text : translate ( 'iou.moveExpenses' , { count : 1 } ) ,
812- icon : Expensicons . DocumentMerge ,
813- value : CONST . REPORT . SECONDARY_ACTIONS . MOVE_EXPENSE ,
814- onSelected : ( ) => {
815- if ( ! moneyRequestReport || ! transaction ) {
816- return ;
817- }
818-
819- Navigation . navigate (
820- ROUTES . MONEY_REQUEST_STEP_REPORT . getRoute ( CONST . IOU . ACTION . EDIT , iouType , transaction . transactionID , moneyRequestReport . reportID , getReportRHPActiveRoute ( ) ) ,
821- ) ;
822- } ,
823- } ,
824795 [ CONST . REPORT . SECONDARY_ACTIONS . DELETE ] : {
825796 text : translate ( 'common.delete' ) ,
826797 icon : Expensicons . Trashcan ,
0 commit comments