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.

26 lines (21 loc) 875 B
import React, { Component } from 'react' import ProviderIcons from './providerIcons.jsx' import EntityIcon from './EntityIcon.jsx' import EntityLink from './EntityLink.jsx' import EntityDate from './EntityDate.jsx' import { getFileTypeUrlFromEntity } from '../../helpers/fileType'; export default class EntityDefaultHeader extends Component { render() { const { entity, openInNewTab } = this.props; let entityIcon = <EntityIcon entityType={entity.data.entityType}></EntityIcon>; let typeURL = getFileTypeUrlFromEntity( entity ); if( typeURL ) { entityIcon = (<img className="cluedIn_entity_fileExtension" src={typeURL}/>); } return (<div className="cluedIn_entity_row_sub"> {entityIcon} <EntityLink openInNewTab={openInNewTab} entity={entity}></EntityLink> <EntityDate entity={entity}></EntityDate> </div>); } }