@@ -5,7 +5,6 @@ import CONST from '@src/CONST';
55import ONYXKEYS from '@src/ONYXKEYS' ;
66import type { SearchResults } from '@src/types/onyx' ;
77
8- import type { DependencyList } from 'react' ;
98import type { OnyxCollection , OnyxEntry , OnyxKey , OnyxValue , UseOnyxOptions , UseOnyxResult } from 'react-native-onyx' ;
109
1110import { use } from 'react' ;
@@ -73,7 +72,7 @@ function resolveSnapshotAwareResult<TKey extends OnyxKey, TReturnValue>(
7372/**
7473 * Custom hook for accessing and subscribing to Onyx data with search snapshot support
7574 */
76- const useOnyx : OriginalUseOnyx = < TKey extends OnyxKey , TReturnValue = OnyxValue < TKey > > ( key : TKey , options ?: UseOnyxOptions < TKey , TReturnValue > , dependencies ?: DependencyList ) => {
75+ const useOnyx : OriginalUseOnyx = < TKey extends OnyxKey , TReturnValue = OnyxValue < TKey > > ( key : TKey , options ?: UseOnyxOptions < TKey , TReturnValue > ) => {
7776 const isSnapshotCompatibleKey = ! key . startsWith ( ONYXKEYS . COLLECTION . SNAPSHOT ) && CONST . SEARCH . SNAPSHOT_ONYX_KEYS . some ( ( snapshotKey ) => key . startsWith ( snapshotKey ) ) ;
7877 const isOnSearch = useIsOnSearch ( ) ;
7978
@@ -98,7 +97,7 @@ const useOnyx: OriginalUseOnyx = <TKey extends OnyxKey, TReturnValue = OnyxValue
9897 const onyxOptions : UseOnyxOptions < OnyxKey , OnyxValue < OnyxKey > > = { ...optionsWithoutSelector , selector} ;
9998 const snapshotKey = shouldUseSnapshot ? ( `${ ONYXKEYS . COLLECTION . SNAPSHOT } ${ currentSearchHash } ` as OnyxKey ) : key ;
10099
101- const originalResult = originalUseOnyx ( snapshotKey , onyxOptions , dependencies ) ;
100+ const originalResult = originalUseOnyx ( snapshotKey , onyxOptions ) ;
102101
103102 // Extract the specific key data from snapshot if in search mode
104103 const result = resolveSnapshotAwareResult < TKey , TReturnValue > ( shouldUseSnapshot , ! ! selector , originalResult , key ) ;
0 commit comments