abb-core
Version:
Application Build Butler Core
24 lines (23 loc) • 861 B
JavaScript
import * as tslib_1 from "tslib";
import i18n from "./i18n";
import * as React from 'react';
import { connect } from "react-redux";
import { I18nextProvider } from 'react-i18next';
var ABBTranslator = /** @class */ (function (_super) {
tslib_1.__extends(ABBTranslator, _super);
function ABBTranslator(props) {
return _super.call(this, props) || this;
}
ABBTranslator.prototype.render = function () {
return (React.createElement(I18nextProvider, { i18n: i18n }, this.props.children));
};
return ABBTranslator;
}(React.Component));
// connect Redux
var RCABBTranslator = connect(function (state) {
return {
transltorResource: state.transltorResource,
currentLanguage: state.currentLanguage
};
}, undefined, undefined, { forwardRef: true })(ABBTranslator);
export { RCABBTranslator, ABBTranslator };