import { ComponentType, Suspense } from 'react'; export function withI18nSuspense( 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 ( ); } WrapperComponent.displayName = `withI18nSuspense(${displayName})`; return WrapperComponent; }