1- import type { MutableRefObject , RefObject } from 'react' ;
1+ import type { RefObject } from 'react' ;
22import React , { useContext , useMemo , useRef , useState } from 'react' ;
33import type { View } from 'react-native' ;
44import type { OnyxEntry } from 'react-native-onyx' ;
@@ -30,15 +30,15 @@ type AccountingContextType = {
3030 /*
3131 * This stores refs to integration buttons, so the PopoverMenu can be positioned correctly
3232 */
33- popoverAnchorRefs : RefObject < Record < string , MutableRefObject < View | null > > > ;
33+ popoverAnchorRefs : RefObject < Record < string , RefObject < View | null > > > ;
3434} ;
3535
3636const popoverAnchorRefsInitialValue = Object . values ( CONST . POLICY . CONNECTIONS . NAME ) . reduce (
3737 ( acc , key ) => {
3838 acc [ key ] = { current : null } ;
3939 return acc ;
4040 } ,
41- { } as Record < ConnectionName , MutableRefObject < View | null > > ,
41+ { } as Record < ConnectionName , RefObject < View | null > > ,
4242) ;
4343
4444const defaultAccountingContext = {
@@ -56,7 +56,7 @@ type AccountingContextProviderProps = ChildrenProps & {
5656} ;
5757
5858function AccountingContextProvider ( { children, policy} : AccountingContextProviderProps ) {
59- const popoverAnchorRefs = useRef < Record < string , MutableRefObject < View | null > > > ( defaultAccountingContext . popoverAnchorRefs . current ) ;
59+ const popoverAnchorRefs = useRef < Record < string , RefObject < View | null > > > ( defaultAccountingContext . popoverAnchorRefs . current ) ;
6060 const [ activeIntegration , setActiveIntegration ] = useState < ActiveIntegrationState > ( ) ;
6161 const { translate} = useLocalize ( ) ;
6262 const policyID = policy ?. id ;
0 commit comments