UNPKG

@atlaskit/profilecard

Version:

A React component to display a card with user information.

28 lines 1.41 kB
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/inherits"; function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } import React from 'react'; export var ErrorBoundary = /*#__PURE__*/function (_React$Component) { function ErrorBoundary() { _classCallCheck(this, ErrorBoundary); return _callSuper(this, ErrorBoundary, arguments); } _inherits(ErrorBoundary, _React$Component); return _createClass(ErrorBoundary, [{ key: "componentDidCatch", value: function componentDidCatch() { // Failure analytics here too this.props.onError(); } }, { key: "render", value: function render() { return this.props.children; } }]); }(React.Component); export default ErrorBoundary;