import { ComponentType } from 'react'; import { UserProvider } from '@/react/hooks/useUser'; export function withCurrentUser( WrappedComponent: ComponentType ): ComponentType { // Try to create a nice displayName for React Dev Tools. const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; function WrapperComponent(props: T) { return ( {/* eslint-disable-next-line react/jsx-props-no-spreading */} ); } WrapperComponent.displayName = displayName; return WrapperComponent; }