diff options
Diffstat (limited to 'packages/gitbook-core/src/components/InjectedComponent.js')
-rw-r--r-- | packages/gitbook-core/src/components/InjectedComponent.js | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/packages/gitbook-core/src/components/InjectedComponent.js b/packages/gitbook-core/src/components/InjectedComponent.js index fe386ef..f8e5b04 100644 --- a/packages/gitbook-core/src/components/InjectedComponent.js +++ b/packages/gitbook-core/src/components/InjectedComponent.js @@ -2,6 +2,7 @@ const React = require('react'); const connect = require('./connect'); const UnsafeComponent = require('./UnsafeComponent'); +const { findMatchingComponents } = require('../actions/components'); /* Public: InjectedComponent makes it easy to include a set of dynamically registered @@ -52,23 +53,6 @@ const InjectedComponentSet = React.createClass({ }); /** - * Find all components matching a descriptor - * @param {List<ComponentDescriptor>} components - * @param {String} matching.role - */ -function findMatchingComponents(components, matching) { - return components - .filter(({descriptor}) => { - if (matching.role && matching.role === descriptor.role) { - return false; - } - - return true; - }) - .map(component => component.Component); -} - -/** * Map Redux state to InjectedComponentSet's props */ function mapStateToProps(state, props) { |