Skip to content

Commit c61cd0e

Browse files
committed
fix: use custom useOnyx instead
1 parent 22f8c74 commit c61cd0e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React, {useMemo} from 'react';
22
import type {ColorValue} from 'react-native';
33
import {View} from 'react-native';
4-
// eslint-disable-next-line no-restricted-imports
5-
import {useOnyx as originalUseOnyx} from 'react-native-onyx';
64
import Checkbox from '@components/Checkbox';
75
import {useDelegateNoAccessActions, useDelegateNoAccessState} from '@components/DelegateNoAccessModalProvider';
86
import Icon from '@components/Icon';
@@ -222,7 +220,7 @@ function ReportListItemHeader<TItem extends ListItem>({
222220
const snapshotPolicy = useMemo(() => {
223221
return (snapshot?.data?.[`${ONYXKEYS.COLLECTION.POLICY}${reportItem.policyID}`] ?? {}) as Policy;
224222
}, [snapshot, reportItem.policyID]);
225-
const [parentPolicy] = originalUseOnyx(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(snapshotReport?.policyID ?? reportItem.policyID)}`);
223+
const [parentPolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${getNonEmptyStringOnyxID(snapshotReport?.policyID ?? reportItem.policyID)}`);
226224
const {isDelegateAccessRestricted} = useDelegateNoAccessState();
227225
const {showDelegateNoAccessModal} = useDelegateNoAccessActions();
228226
const [amountOwed] = useOnyx(ONYXKEYS.NVP_PRIVATE_AMOUNT_OWED);

0 commit comments

Comments
 (0)