diff --git a/src/components/withCurrentReportID.tsx b/src/components/withCurrentReportID.tsx index b551d321eb6c..c3fd8d8120f5 100644 --- a/src/components/withCurrentReportID.tsx +++ b/src/components/withCurrentReportID.tsx @@ -1,7 +1,5 @@ import type {NavigationState} from '@react-navigation/native'; -import type {ComponentType, ForwardedRef, RefAttributes} from 'react'; -import React, {createContext, forwardRef, useCallback, useMemo, useState} from 'react'; -import getComponentDisplayName from '@libs/getComponentDisplayName'; +import React, {createContext, useCallback, useMemo, useState} from 'react'; import Navigation from '@libs/Navigation/Navigation'; type CurrentReportIDContextValue = { @@ -61,29 +59,5 @@ function CurrentReportIDContextProvider(props: CurrentReportIDContextProviderPro CurrentReportIDContextProvider.displayName = 'CurrentReportIDContextProvider'; -export default function withCurrentReportID( - WrappedComponent: ComponentType>, -): (props: Omit & React.RefAttributes) => React.ReactElement | null { - function WithCurrentReportID(props: Omit, ref: ForwardedRef) { - return ( - - {(currentReportIDUtils) => ( - - )} - - ); - } - - WithCurrentReportID.displayName = `withCurrentReportID(${getComponentDisplayName(WrappedComponent)})`; - - return forwardRef(WithCurrentReportID); -} - export {withCurrentReportIDDefaultProps, CurrentReportIDContextProvider, CurrentReportIDContext}; export type {CurrentReportIDContextValue};