import React, { PropTypes } from 'react' import FontAwesome from 'react-fontawesome' import { Link } from 'react-router' export default class ArtistSentence extends React.Component{ constructor(props){ super(props); } render(){ if (!this.props.artists ) return - return ( { this.props.artists.map((artist, index) => { if (!artist) return - var separator = null; if (index == this.props.artists.length - 2){ separator = ' and '; }else if (index < this.props.artists.length - 2){ separator = ', '; } if (!artist.name){ var content = - } else if (!artist.uri || this.props.nolinks){ var content = { artist.name } } else { var content = { artist.name } } return ( { content } { separator } ); }) } ); } }