Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
locale = _props.locale,
customMessages = _props.customMessages,
customProps = _objectWithoutProperties(_props, ['children', 'locale', 'customMessages']);
var childComponent = _react2.default.createElement(
'div',
customProps,
children
);
var messages = _extends({}, this.state.messages, customMessages);
if (locale === undefined) return childComponent;
if (!this.state.areTranslationsLoaded) return null;
return _react2.default.createElement(
_terraI18n.I18nProvider,
{ locale: this.state.locale, messages: messages },
childComponent
);
}
}]);