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) => {
var separator = null;
if( index == this.props.artists.length - 2 ){
separator = ' and ';
}else if( index < this.props.artists.length - 2 ){
separator = ', ';
}
if( !artist.name ) artist.name = '-'
if( artist.uri ){
var content = { artist.name }
}else{
var content = { artist.name }
}
return (
{ content }
{ separator }
);
})
}
);
}
}