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.

21 lines (19 loc) 651 B
import React, { Component } from 'react'; import config from '../../config'; import { Link } from 'react-router'; import ReactEmoji from 'react-emoji'; export default class EntityLink extends Component { render() { const { entity, openInNewTab } = this.props; const linkUrl = config.location.goToEntity(entity); let linkContent = (<Link to={linkUrl}> {ReactEmoji.emojify(entity.name)}</Link>); if (openInNewTab) { linkContent = (<Link target="_blank" to={linkUrl}> {ReactEmoji.emojify(entity.name)}</Link>); } return ( <div className="cluedIn_entity_row_title"> {linkContent} </div> ); } };