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.
36 lines (31 loc) • 1.39 kB
JSX
import React, { Component } from 'react';
import ProviderIcons from '../entityRelated/providerIcons.jsx';
import EntityIcon from '../entityRelated/EntityIcon.jsx';
import EntityLink from '../entityRelated/EntityLink.jsx';
import EntityLogo from '../entityRelated/EntityLogo.jsx';
import SocialProperties from '../entityRelated/SocialProperties.jsx';
import EntityDate from '../entityRelated/EntityDate.jsx';
export default class Organization extends Component {
  render() {
    const { entity, openInNewTab }  = this.props;
    let IconHtml = (<EntityIcon entityType={entity.data.entityType}></EntityIcon>);
    if (entity.hasPreview || entity.hasLogo) {
      IconHtml = (<EntityLogo url={entity.logoUrl || entity.previewUrl}></EntityLogo>);
    } else {
      IconHtml = (<EntityIcon entityType={entity.data.entityType}></EntityIcon>);
    }
    return (
      <div className="cluedIn_entity_row">
        <div className="cluedIn_entity_row_sub">
          <ProviderIcons providers={entity.providers}></ProviderIcons>
          {IconHtml}
          <EntityLink openInNewTab={openInNewTab} entity={entity}></EntityLink>
          <EntityDate entity={entity}></EntityDate>
        </div>
        <div className="cluedIn_row cluedIn_row_notCentered cluedIn_entity_table">
          <SocialProperties properties={entity.social}></SocialProperties>
        </div>
      </div>
    );
  }
}