cluedin-widget
Version: 
This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.
28 lines (22 loc) • 533 B
JSX
import React, { PropTypes } from 'react';
export default class WidgetWithPlaceWidgetComponent extends React.Component {
  static propTypes = {
    widgets: PropTypes.node,
  };
  placeWidget(name) {
    const children = this.props.widgets;
    if (!children) {
      return;
    }
    if (!name) {
      children.filter((c) => (c && !c.place));
    } else {
      children.filter((c) => {
        if (!c.place && name === 'Content') {
          return true;
        }
        return c && c.place === name;
      });
    }
  }
}