import {useContext} from 'react'; import getDisplayName from 'sentry/utils/getDisplayName'; import {RouteAnalyticsContext} from 'sentry/views/routeAnalyticsContextProvider'; type WithRouteAnalyticsProps = React.ContextType; type WrappedProps

= Omit & Partial; const withRouteAnalytics =

( WrappedComponent: React.ComponentType

) => { const ComponentWithRouteAnalytics: React.FC> = props => { const routeAnalyticsContext = useContext(RouteAnalyticsContext); return ; }; ComponentWithRouteAnalytics.displayName = `withRouteAnalytics(${getDisplayName( WrappedComponent )})`; return ComponentWithRouteAnalytics; }; export default withRouteAnalytics; export {WithRouteAnalyticsProps};