UNPKG

codogo-react-widgets

Version:

Provides a unified way to access the styling of commonly used widgets across different apps

38 lines (31 loc) 1.22 kB
import _extends from "babel-runtime/helpers/extends"; import _classCallCheck from "babel-runtime/helpers/classCallCheck"; import _createClass from "babel-runtime/helpers/createClass"; import _possibleConstructorReturn from "babel-runtime/helpers/possibleConstructorReturn"; import _inherits from "babel-runtime/helpers/inherits"; import React from "react"; import * as R from "ramda"; export default (function (Comp) { return function (_React$Component) { _inherits(WithApolloQueriesInFlight, _React$Component); function WithApolloQueriesInFlight(props) { _classCallCheck(this, WithApolloQueriesInFlight); var _this = _possibleConstructorReturn(this, (WithApolloQueriesInFlight.__proto__ || Object.getPrototypeOf(WithApolloQueriesInFlight)).call(this, props)); _this.state = { queryStatuses: {}, mutationsLoading: { false: 0 } }; return _this; } _createClass(WithApolloQueriesInFlight, [{ key: "render", value: function render() { console.warn("WithApolloQueriesInFlight doesn't work anymore"); return React.createElement(Comp, _extends({}, R.omit(["client"])(this.props), this.state)); } }]); return WithApolloQueriesInFlight; }(React.Component); });