Repository URL to install this package:
|
Version:
0.4.4 ▾
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import { Component } from 'react';
import PropTypes from 'prop-types';
var Secure =
/*#__PURE__*/
function (_Component) {
_inherits(Secure, _Component);
function Secure() {
_classCallCheck(this, Secure);
return _possibleConstructorReturn(this, _getPrototypeOf(Secure).apply(this, arguments));
}
_createClass(Secure, [{
key: "render",
value: function render() {
return this.props.render({
auth: this.context.auth,
isAuthenticated: this.context.isAuthenticated,
isAuthorizedFor: this.context.isAuthorizedFor
});
}
}]);
return Secure;
}(Component);
Secure.contextTypes = {
auth: PropTypes.object.isRequired,
isAuthenticated: PropTypes.func.isRequired,
isAuthorizedFor: PropTypes.func.isRequired
};
export { Secure as default };
//# sourceMappingURL=Secure.js.map