@uimkit/uikit-react
Version:
<img style="width:64px" src="https://mgmt.uimkit.chat/media/img/avatar.png"/>
22 lines (17 loc) • 1.01 kB
JavaScript
;
var React = require('react');
var TranslationContext = require('../../context/TranslationContext.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
/**
* UI component for error indicator in a Channel
*/
var UnMemoizedLoadingErrorIndicator = function (_a) {
var error = _a.error;
var t = TranslationContext.useTranslationContext('LoadingErrorIndicator').t;
if (!error)
return null;
return (React__default["default"].createElement("div", null, t('Error: {{ errorMessage }}', { errorMessage: error.message })));
};
React__default["default"].memo(UnMemoizedLoadingErrorIndicator, function (prevProps, nextProps) { var _a, _b; return ((_a = prevProps.error) === null || _a === void 0 ? void 0 : _a.message) === ((_b = nextProps.error) === null || _b === void 0 ? void 0 : _b.message); });
//# sourceMappingURL=LoadingErrorIndicator.js.map