import React from 'react' import { I18nConsumer } from './consumer' import { I18nContextProps } from './context' export interface WithTranslateProps extends I18nContextProps {} function withTranslate

( BaseComponent: React.ComponentType

): React.ComponentType> { const displayName = BaseComponent.displayName || BaseComponent.name || 'Component' return class WithTranslate extends React.Component

{ static displayName = `withTranslate(${displayName})` render() { return ( {(i18nProps) => } ) } } } export { withTranslate }