Skip to content

Commit 4becd4f

Browse files
Rename originalUseOnyx to useOnyxWithoutSnapshots app-wide
Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
1 parent 00031d0 commit 4becd4f

13 files changed

Lines changed: 57 additions & 57 deletions

File tree

‎src/components/CategoryPicker/index.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject';
2424

2525
import React from 'react';
2626
// eslint-disable-next-line no-restricted-imports -- Need original useOnyx to avoid reading partial Search snapshot policy data (GL code flags are trimmed from the snapshot).
27-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
27+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
2828

2929
type CategoryPickerProps = {
3030
policyID: string | undefined;
@@ -58,7 +58,7 @@ const getSelectedOptions = (selectedCategory?: string): Category[] => {
5858
function CategoryPicker({selectedCategory, policyID, onSubmit, shouldShowNoneOption = false, addBottomSafeAreaPadding = false, shouldAutoFocusSearchInput = false}: CategoryPickerProps) {
5959
const styles = useThemeStyles();
6060
const {inputCallbackRef} = useAutoFocusInput();
61-
const [shouldShowGLCode] = originalUseOnyx(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(policyID)}`, {
61+
const [shouldShowGLCode] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(policyID)}`, {
6262
selector: (policy) => !!policy?.showCategoryGLCodes && !!policy?.glCodes,
6363
});
6464
const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${getNonEmptyStringOnyxID(policyID)}`);

‎src/components/ReportActionItem/MoneyRequestView.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ import React, {useState} from 'react';
159159
import {View} from 'react-native';
160160
// Use the original useOnyx hook to get the real-time data from Onyx and not from the snapshot
161161
// eslint-disable-next-line no-restricted-imports
162-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
162+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
163163

164164
import MoneyRequestReceiptView from './MoneyRequestReceiptView';
165165

@@ -574,7 +574,7 @@ function MoneyRequestView({
574574
}
575575
return match;
576576
};
577-
const [tripRoomReport] = originalUseOnyx(ONYXKEYS.COLLECTION.REPORT, {selector: tripRoomReportSelector});
577+
const [tripRoomReport] = useOnyxWithoutSnapshots(ONYXKEYS.COLLECTION.REPORT, {selector: tripRoomReportSelector});
578578
const tripRoomReportID = tripRoomReport?.reportID;
579579

580580
const derivedReportNames = useDerivedReportNamesByReportIDs([tripRoomReportID, parentReport?.reportID]);

‎src/components/Search/SearchList/ListItem/ExpenseReportListItem.tsx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {View} from 'react-native';
5252
// without triggering the wrapper's additional logic, ensuring violations
5353
// sync immediately when category settings change
5454
// eslint-disable-next-line no-restricted-imports
55-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
55+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
5656

5757
import type {ExpenseReportListItemProps, ExpenseReportListItemType} from './types';
5858

@@ -117,10 +117,10 @@ function ExpenseReportListItemInner<TItem extends ListItem>({
117117
const [isTrackIntentUser] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED, {selector: isTrackIntentUserSelector});
118118

119119
// Fetch live policy categories from Onyx to sync violations at render time
120-
const [parentPolicy] = originalUseOnyx(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(reportItem.policyID)}`);
121-
const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(reportItem.reportID)}`);
122-
const [policyCategories] = originalUseOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${getNonEmptyStringOnyxID(reportItem.policyID)}`);
123-
const [submitterLogin] = originalUseOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: personalDetailsLoginSelector(reportItem.ownerAccountID)});
120+
const [parentPolicy] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(reportItem.policyID)}`);
121+
const [parentReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(reportItem.reportID)}`);
122+
const [policyCategories] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${getNonEmptyStringOnyxID(reportItem.policyID)}`);
123+
const [submitterLogin] = useOnyxWithoutSnapshots(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: personalDetailsLoginSelector(reportItem.ownerAccountID)});
124124

125125
const shouldShowMarkAsDoneCopy = shouldShowMarkAsDone({
126126
policy: parentPolicy,
@@ -134,15 +134,15 @@ function ExpenseReportListItemInner<TItem extends ListItem>({
134134
return (searchData?.[`${ONYXKEYS.COLLECTION.REPORT}${reportItem.reportID}`] ?? {}) as Report;
135135
}, [searchData, reportItem.reportID]);
136136

137-
const [parentChatReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(snapshotReport?.chatReportID ?? reportItem.parentReportID)}`);
137+
const [parentChatReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(snapshotReport?.chatReportID ?? reportItem.parentReportID)}`);
138138

139139
const snapshotChatReport = useMemo(() => {
140140
const chatReportID = snapshotReport?.chatReportID ?? reportItem.parentReportID;
141141
return chatReportID ? searchData?.[`${ONYXKEYS.COLLECTION.REPORT}${chatReportID}`] : undefined;
142142
}, [searchData, snapshotReport?.chatReportID, reportItem.parentReportID]);
143143

144144
const chatReport = parentChatReport ?? snapshotChatReport;
145-
const [chatReportActions] = originalUseOnyx(
145+
const [chatReportActions] = useOnyxWithoutSnapshots(
146146
`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(chatReport?.reportID ?? snapshotReport?.chatReportID ?? snapshotReport.parentReportID)}`,
147147
);
148148

@@ -234,7 +234,7 @@ function ExpenseReportListItemInner<TItem extends ListItem>({
234234
// hydrate into the live collection, rule/category changes still push violation updates that must
235235
// reflect on the badge (per-row selector, not the screen-level collection merge this slice removed).
236236
const snapshotTransactionIDs = (reportItem.transactions ?? []).map((transaction) => transaction.transactionID);
237-
const [liveViolationsForSnapshotTransactions] = originalUseOnyx(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS, {selector: transactionViolationsByIDsSelector(snapshotTransactionIDs)});
237+
const [liveViolationsForSnapshotTransactions] = useOnyxWithoutSnapshots(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS, {selector: transactionViolationsByIDsSelector(snapshotTransactionIDs)});
238238
const {currentUserAccountID, currentUserLogin, introSelected, betas, isSelfTourViewed, activePolicy, chatReportPolicy, amountOwed, delegateEmail, delegateAccountID, conciergeChat} =
239239
useReportPaymentContext({
240240
chatReportPolicyID: chatReport?.policyID,

‎src/components/Search/SearchList/ListItem/GroupHeader.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import type {OnyxEntry} from 'react-native-onyx';
3434
import React, {useMemo, useRef} from 'react';
3535
import {View} from 'react-native';
3636
// eslint-disable-next-line no-restricted-imports
37-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
37+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
3838
import Animated from 'react-native-reanimated';
3939

4040
import type {GroupHeaderItemType, SearchListActionProps, SearchListItem, TransactionListItemType} from './types';
@@ -107,10 +107,10 @@ function GroupHeader({
107107
const oneTransactionReportID = getNonEmptyStringOnyxID(oneTransactionItem?.reportID);
108108
const oneTransactionID = getNonEmptyStringOnyxID(oneTransactionItem?.transactionID);
109109
const oneTransactionChildReportID = oneTransactionItem?.reportAction?.childReportID;
110-
const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${oneTransactionReportID}`);
111-
const [oneTransactionThreadReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${oneTransactionChildReportID}`);
112-
const [oneTransaction] = originalUseOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${oneTransactionID}`);
113-
const [parentReportAction] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oneTransactionReportID}`, {
110+
const [parentReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${oneTransactionReportID}`);
111+
const [oneTransactionThreadReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${oneTransactionChildReportID}`);
112+
const [oneTransaction] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.TRANSACTION}${oneTransactionID}`);
113+
const [parentReportAction] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oneTransactionReportID}`, {
114114
selector: (reportActions: OnyxEntry<ReportActions>): OnyxEntry<ReportAction> => reportActions?.[`${oneTransactionItem?.reportAction?.reportActionID}`],
115115
});
116116
const transactionPreviewData: TransactionPreviewData = useMemo(

‎src/components/Search/SearchList/ListItem/ReportListItemHeader.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import React, {useMemo} from 'react';
4646
import {View} from 'react-native';
4747
// Use the original useOnyx hook to get the real-time personal details list data from Onyx and not from the snapshot
4848
// eslint-disable-next-line no-restricted-imports
49-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
49+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
5050

5151
import type {SearchListActionProps, TransactionReportGroupListItemType} from './types';
5252

@@ -282,7 +282,7 @@ function ReportListItemHeaderInner<TItem extends ListItem>({
282282
}, [snapshot, snapshotReport?.chatReportID, reportItem.parentReportID]);
283283
const [parentPolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(snapshotReport?.policyID ?? reportItem.policyID)}`);
284284
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(snapshotReport?.reportID ?? reportItem.reportID)}`);
285-
const [submitterLogin] = originalUseOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: personalDetailsLoginSelector(reportItem.ownerAccountID)});
285+
const [submitterLogin] = useOnyxWithoutSnapshots(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: personalDetailsLoginSelector(reportItem.ownerAccountID)});
286286
const [parentChatReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(snapshotReport?.chatReportID ?? reportItem.parentReportID)}`);
287287
const chatReport = parentChatReport ?? snapshotChatReport;
288288
const [chatReportActions] = useOnyx(
@@ -296,7 +296,7 @@ function ReportListItemHeaderInner<TItem extends ListItem>({
296296
});
297297

298298
const reportTransactionIDs = (reportItem.transactions ?? []).map((transaction) => transaction.transactionID);
299-
const [allViolations] = originalUseOnyx(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS, {selector: transactionViolationsByIDsSelector(reportTransactionIDs)});
299+
const [allViolations] = useOnyxWithoutSnapshots(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS, {selector: transactionViolationsByIDsSelector(reportTransactionIDs)});
300300

301301
const {currentUserAccountID, currentUserLogin, introSelected, betas, isSelfTourViewed, activePolicy, chatReportPolicy, amountOwed, delegateEmail, delegateAccountID, conciergeChat} =
302302
useReportPaymentContext({

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import React, {useEffect, useRef, useState} from 'react';
3737
import {View} from 'react-native';
3838
// Use the original useOnyx hook to get the real-time data from Onyx and not from the snapshot
3939
// eslint-disable-next-line no-restricted-imports
40-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
40+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
4141

4242
import type {
4343
TransactionCardGroupListItemType,
@@ -110,10 +110,10 @@ function TransactionGroupListItemImpl({
110110
const {isOffline} = useNetwork();
111111

112112
const oneTransactionItem = groupItem.isOneTransactionReport ? groupItem.transactions.at(0) : undefined;
113-
const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(oneTransactionItem?.reportID)}`);
114-
const [oneTransactionThreadReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${oneTransactionItem?.reportAction?.childReportID}`);
115-
const [oneTransaction] = originalUseOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${getNonEmptyStringOnyxID(oneTransactionItem?.transactionID)}`);
116-
const [parentReportAction] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(oneTransactionItem?.reportID)}`, {
113+
const [parentReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(oneTransactionItem?.reportID)}`);
114+
const [oneTransactionThreadReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${oneTransactionItem?.reportAction?.childReportID}`);
115+
const [oneTransaction] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.TRANSACTION}${getNonEmptyStringOnyxID(oneTransactionItem?.transactionID)}`);
116+
const [parentReportAction] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(oneTransactionItem?.reportID)}`, {
117117
selector: (reportActions: OnyxEntry<ReportActions>): OnyxEntry<ReportAction> => reportActions?.[`${oneTransactionItem?.reportAction?.reportActionID}`],
118118
});
119119
const transactionPreviewData: TransactionPreviewData = {

‎src/components/Search/SearchList/ListItem/TransactionListItem/index.tsx‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {isTrackIntentUserSelector} from '@selectors/Onboarding';
5252
import React from 'react';
5353
// Use the original useOnyx hook to get the real-time data from Onyx and not from the snapshot
5454
// eslint-disable-next-line no-restricted-imports
55-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
55+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
5656

5757
import TransactionListItemNarrow from './TransactionListItemNarrow';
5858
import TransactionListItemWide from './TransactionListItemWide';
@@ -118,36 +118,36 @@ function TransactionListItemInner<TItem extends ListItem>({
118118
if (!policyID && transactionItem.reportID === CONST.REPORT.UNREPORTED_REPORT_ID) {
119119
policyID = policyForMovingExpensesID;
120120
}
121-
const [parentPolicy] = originalUseOnyx(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(policyID)}`);
121+
const [parentPolicy] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(policyID)}`);
122122
const snapshotPolicy = (currentSearchResults?.data?.[`${ONYXKEYS.COLLECTION.POLICY}${transactionItem.policyID}`] ?? {}) as Policy;
123123

124124
const actionsData = currentSearchResults?.data?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionItem.reportID}`];
125125
const reportActions = actionsData ? Object.values(actionsData) : [];
126126

127127
// Fetch policy categories directly from Onyx since they are not included in the search snapshot
128-
const [policyCategories] = originalUseOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${getNonEmptyStringOnyxID(policyID)}`);
128+
const [policyCategories] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${getNonEmptyStringOnyxID(policyID)}`);
129129
// Fetch policy tags directly from Onyx (not in the snapshot) so the Tag GL code cell can resolve.
130-
const [policyTagLists] = originalUseOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${getNonEmptyStringOnyxID(policyID)}`);
130+
const [policyTagLists] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${getNonEmptyStringOnyxID(policyID)}`);
131131

132-
const [parentReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(transactionItem.reportID)}`);
133-
const [transactionThreadReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionItem?.reportAction?.childReportID}`);
132+
const [parentReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(transactionItem.reportID)}`);
133+
const [transactionThreadReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${transactionItem?.reportAction?.childReportID}`);
134134
const [submitterLogin] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {selector: personalDetailsLoginSelector(transactionItem?.report?.ownerAccountID)});
135-
const [transaction] = originalUseOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${getNonEmptyStringOnyxID(transactionItem.transactionID)}`);
135+
const [transaction] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.TRANSACTION}${getNonEmptyStringOnyxID(transactionItem.transactionID)}`);
136136
const transactionViolationsKey = `${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${getNonEmptyStringOnyxID(transactionItem.transactionID)}` as const;
137-
const [transactionViolationsForRow] = originalUseOnyx(transactionViolationsKey);
137+
const [transactionViolationsForRow] = useOnyxWithoutSnapshots(transactionViolationsKey);
138138
const allViolations: OnyxCollection<TransactionViolations> = {[transactionViolationsKey]: transactionViolationsForRow};
139139
const parentReportActionID = transactionItem?.reportAction?.reportActionID;
140-
const [parentReportAction] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(transactionItem.reportID)}`, {
140+
const [parentReportAction] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(transactionItem.reportID)}`, {
141141
selector: (actions: OnyxEntry<ReportActions>): OnyxEntry<ReportAction> => actions?.[`${parentReportActionID}`],
142142
});
143143
const currentUserDetails = useCurrentUserPersonalDetails();
144144
const chatReportID = snapshotReport?.chatReportID ?? snapshotReport?.parentReportID;
145-
const [parentChatReport] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(chatReportID)}`);
145+
const [parentChatReport] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(chatReportID)}`);
146146
// Fall back to the search snapshot when the chat report isn't in live Onyx yet (e.g. offline or not fetched),
147147
// matching the grouped-report path in ReportListItemHeader so the Pay flow can still resolve the chat report.
148148
const snapshotChatReport = chatReportID ? snapshotData?.[`${ONYXKEYS.COLLECTION.REPORT}${chatReportID}`] : undefined;
149149
const chatReport = parentChatReport ?? snapshotChatReport;
150-
const [chatReportActions] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(chatReport?.reportID ?? chatReportID)}`);
150+
const [chatReportActions] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(chatReport?.reportID ?? chatReportID)}`);
151151
const {amountOwed, currentUserAccountID, currentUserLogin, introSelected, betas, isSelfTourViewed, activePolicy, chatReportPolicy, delegateEmail, delegateAccountID, conciergeChat} =
152152
useReportPaymentContext({
153153
chatReportPolicyID: chatReport?.policyID,

‎src/components/Search/SearchList/ListItem/useLiveRowCapabilities.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {ReportAction, SearchResults} from '@src/types/onyx';
1212
import type {SearchTransactionAction} from '@src/types/onyx/SearchResults';
1313

1414
// eslint-disable-next-line no-restricted-imports
15-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
15+
import {useOnyx as useOnyxWithoutSnapshots} from 'react-native-onyx';
1616

1717
type LiveRowItem = {
1818
action?: SearchTransactionAction;
@@ -51,8 +51,8 @@ function useLiveRowCapabilities<T extends LiveRowItem>(params: UseLiveRowCapabil
5151
const {currentSearchKey} = useSearchQueryContext();
5252
const {currentSearchTransactionsByReportID, currentSearchViolations} = useSearchResultsContext();
5353
const currentUserDetails = useCurrentUserPersonalDetails();
54-
const [liveReportActions] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(reportID)}`);
55-
const [liveReportMetadata] = originalUseOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${getNonEmptyStringOnyxID(reportID)}`);
54+
const [liveReportActions] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(reportID)}`);
55+
const [liveReportMetadata] = useOnyxWithoutSnapshots(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${getNonEmptyStringOnyxID(reportID)}`);
5656
const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST);
5757

5858
if (!enabled || !snapshotData) {

0 commit comments

Comments
 (0)