UNPKG

cluedin-widget

Version:

This is the project for creating and managing widgets in CluedIn.

23 lines (18 loc) 718 B
import React, { Component } from 'react'; import { findFromKey, makeTwitterLink } from '../../helpers/properties.jsx' export default class SocialProperties extends Component { render() { const { properties } = this.props; let twitterResult; if ( !properties || properties.length === 0 ) { return (<span></span>); } var twitterProp = findFromKey( properties, 'twitter' ); if ( twitterProp && twitterProp.value ) { twitterResult = makeTwitterLink( twitterProp ); } else { return (<span></span>); } return <div className="cluedIn_social_links cluedIn_col s12 cluedIn_m-t-xs">{twitterResult}</div> } }