UNPKG

@winstrike/next-i18next-koa

Version:

The easiest way to translate your NextJs apps. With Koa support only. Forked from 'next-i18next'.

20 lines (17 loc) 445 B
import React from 'react'; import PropTypes from 'prop-types'; import { withNamespaces } from 'react-i18next'; class NextStaticProvider extends React.Component { render() { const { children, tReady } = this.props; return tReady ? children : null; } } NextStaticProvider.propTypes = { children: PropTypes.node.isRequired, tReady: PropTypes.bool.isRequired }; export default withNamespaces()(NextStaticProvider);