import React, { memo } from 'react'
import URILink from './URILink'
export default memo((props) => {
if (!props.artists){
return -;
}
return (
{
props.artists.map((artist, index) => {
if (!artist){
return -;
}
var separator = null;
if (index == props.artists.length - 2){
separator = ' and ';
} else if (index < props.artists.length - 2){
separator = ', ';
}
if (!artist.name){
var content = -
} else if (!artist.uri || props.nolinks){
var content = { artist.name }
} else {
var content = { artist.name }
}
return (
{ content }
{ separator }
);
})
}
);
});