From 050f4d1918ab9ec4c34d7b48672ce3b440ce7036 Mon Sep 17 00:00:00 2001 From: Owen Conti Date: Sun, 20 Aug 2017 17:02:51 -0600 Subject: [PATCH] Clean up OperationContainer props. --- src/core/components/operations.jsx | 17 ++++++------- src/core/containers/OperationContainer.jsx | 29 +++++++++++----------- src/core/plugins/view/root-injects.js | 2 +- src/core/system.js | 3 +-- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/core/components/operations.jsx b/src/core/components/operations.jsx index 724c82f9..382960b7 100644 --- a/src/core/components/operations.jsx +++ b/src/core/components/operations.jsx @@ -29,14 +29,11 @@ export default class Operations extends React.Component { let taggedOps = specSelectors.taggedOperations() - const Operation = getComponent("OperationContainer", true) + const OperationContainer = getComponent("OperationContainer", true) const Collapse = getComponent("Collapse") - let showSummary = layoutSelectors.showSummary() let { docExpansion, - displayOperationId, - displayRequestDuration, maxDisplayedTags, deepLinking } = getConfigs() @@ -114,13 +111,15 @@ export default class Operations extends React.Component { { operations.map( op => { - return class extends Component { } const makeContainer = (getSystem, component, reduxStore) => { - const mapStateToProps = component.prototype.constructor.mapStateToProps || function(state) { + const mapStateToProps = component.prototype.mapStateToProps || function(state) { return {state} } let wrappedWithSystem = SystemWrapper(getSystem, component, reduxStore) diff --git a/src/core/system.js b/src/core/system.js index e4eee5b8..06071bc9 100644 --- a/src/core/system.js +++ b/src/core/system.js @@ -289,8 +289,7 @@ export default class Store { getMapStateToProps() { return () => { - let obj = Object.assign({}, this.getSystem()) - return obj + return Object.assign({}, this.getSystem()) } }