1
1
import React from 'react' ;
2
2
import { View } from 'react-native' ;
3
3
import Checkbox from '@components/Checkbox' ;
4
- import { useSearchContext } from '@components/Search/SearchContext' ;
5
4
import BaseListItem from '@components/SelectionList/BaseListItem' ;
6
5
import type { ListItem , ReportListItemProps , ReportListItemType , TransactionListItemType } from '@components/SelectionList/types' ;
7
6
import Text from '@components/Text' ;
@@ -11,7 +10,6 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout';
11
10
import useStyleUtils from '@hooks/useStyleUtils' ;
12
11
import useTheme from '@hooks/useTheme' ;
13
12
import useThemeStyles from '@hooks/useThemeStyles' ;
14
- import { handleActionButtonPress } from '@libs/actions/Search' ;
15
13
import * as CurrencyUtils from '@libs/CurrencyUtils' ;
16
14
import Navigation from '@libs/Navigation/Navigation' ;
17
15
import variables from '@styles/variables' ;
@@ -71,7 +69,6 @@ function ReportListItem<TItem extends ListItem>({
71
69
const styles = useThemeStyles ( ) ;
72
70
const { isLargeScreenWidth} = useResponsiveLayout ( ) ;
73
71
const StyleUtils = useStyleUtils ( ) ;
74
- const { currentSearchHash} = useSearchContext ( ) ;
75
72
76
73
const animatedHighlightStyle = useAnimatedHighlightStyle ( {
77
74
borderRadius : variables . componentBorderRadius ,
@@ -96,7 +93,7 @@ function ReportListItem<TItem extends ListItem>({
96
93
] ;
97
94
98
95
const handleOnButtonPress = ( ) => {
99
- handleActionButtonPress ( currentSearchHash , reportItem , ( ) => onSelectRow ( item ) ) ;
96
+ onSelectRow ( item ) ;
100
97
} ;
101
98
102
99
const openReportInRHP = ( transactionItem : TransactionListItemType ) => {
@@ -168,7 +165,6 @@ function ReportListItem<TItem extends ListItem>({
168
165
action = { reportItem . action }
169
166
onButtonPress = { handleOnButtonPress }
170
167
containerStyle = { [ styles . ph3 , styles . pt1half , styles . mb1half ] }
171
- isLoading = { reportItem . isActionLoading }
172
168
/>
173
169
) }
174
170
< View style = { [ styles . flex1 , styles . flexRow , styles . alignItemsCenter , styles . gap3 , styles . ph3 , styles . pv1half ] } >
@@ -203,7 +199,6 @@ function ReportListItem<TItem extends ListItem>({
203
199
action = { reportItem . action }
204
200
goToItem = { handleOnButtonPress }
205
201
isSelected = { item . isSelected }
206
- isLoading = { reportItem . isActionLoading }
207
202
/>
208
203
</ View >
209
204
) }
0 commit comments