import React, { Component } from 'react'; import i18n, { context } from '.'; export interface I18nProps { i18n: typeof i18n; } function withI18n(WrappedComponent: React.ComponentType) { class WithI18n extends Component> { static displayName = `WithI18n.${WrappedComponent.displayName || WrappedComponent.name}`; render() { return ( {props => } ); } } return WithI18n; } export default withI18n;