Skip to content

Commit 30cb7dc

Browse files
authored
Merge pull request Expensify#90486 from callstack-internal/perf/search-list-offline-into-group-row
[No QA] perf: move Search list isOffline into TransactionGroupListItem
2 parents 48d4268 + a6e48ec commit 30cb7dc

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/Search/SearchList/ListItem/TransactionGroupListItem.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import useAnimatedHighlightStyle from '@hooks/useAnimatedHighlightStyle';
1717
import {useCurrencyListActions} from '@hooks/useCurrencyList';
1818
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
1919
import useLocalize from '@hooks/useLocalize';
20+
import useNetwork from '@hooks/useNetwork';
2021
import useOnyx from '@hooks/useOnyx';
2122
import useResponsiveLayout from '@hooks/useResponsiveLayout';
2223
import useStyleUtils from '@hooks/useStyleUtils';
@@ -75,7 +76,6 @@ function TransactionGroupListItem<TItem extends ListItem>({
7576
columns,
7677
groupBy,
7778
searchType,
78-
isOffline,
7979
newTransactionID,
8080
lastPaymentMethod,
8181
personalPolicyID,
@@ -96,6 +96,7 @@ function TransactionGroupListItem<TItem extends ListItem>({
9696
const currentUserDetails = useCurrentUserPersonalDetails();
9797
const isScreenFocused = useIsFocused();
9898
const {convertToDisplayString} = useCurrencyListActions();
99+
const {isOffline} = useNetwork();
99100

100101
const oneTransactionItem = groupItem.isOneTransactionReport ? groupItem.transactions.at(0) : undefined;
101102
const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(oneTransactionItem?.reportID)}`);

src/components/Search/SearchList/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ function SearchList({
450450
ownerBillingGracePeriodEnd={ownerBillingGracePeriodEnd}
451451
personalDetails={personalDetails}
452452
userBillingFundID={userBillingFundID}
453-
isOffline={isOffline}
454453
nonPersonalAndWorkspaceCards={nonPersonalAndWorkspaceCards}
455454
onFocus={onFocus}
456455
newTransactionID={newTransactionID}
@@ -479,7 +478,6 @@ function SearchList({
479478
columns,
480479
personalDetails,
481480
userBillingFundID,
482-
isOffline,
483481
lastPaymentMethod,
484482
personalPolicyID,
485483
onHoldMenuOpen,

0 commit comments

Comments
 (0)