UNPKG

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.

30 lines (24 loc) 924 B
import React, { Component } from 'react'; import Widget from '../../../core/components/generics/widget.jsx'; import { register } from "../../../core/registry"; import { connect } from 'react-redux'; import PropertyViewer from '../../../core/components/entityRelated/EntityPropertyViewer.jsx'; class EntityProperty extends Component { render() { const { entity } = this.props; if ( !entity ) { let isLoading = true; return (<Widget title="Extra Information" loading={isLoading}></Widget>) } return (<Widget noMaxHeight={true} title="Extra Information"> <PropertyViewer entity={entity}></PropertyViewer> </Widget>); } } function select( state ) { return { entity: state.entity.selectedEntity, isFetchingEntity: state.entity.isFetchingEntity }; } register( 'EntityProperty', connect( select )( EntityProperty ) );