Fully operational mopidy middleware; Spotify middleware next

This commit is contained in:
James Barnsley
2016-10-16 12:37:37 +13:00
parent ec7d6ae895
commit 9fddcc9948
20 changed files with 335 additions and 386 deletions

34
src/js/components/ArtistList.js Executable file
View File

@ -0,0 +1,34 @@
import React, { PropTypes } from 'react'
import FontAwesome from 'react-fontawesome'
import { Link } from 'react-router'
export default class ArtistList extends React.Component{
constructor(props) {
super(props);
}
render(){
return (
<span className="artist-list">
{
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 = ', ';
}
var link = '/artist/' + artist.uri;
return (
<span className="artist" key={artist.uri}>
<Link to={ link }>{ artist.name }</Link>{ separator }
</span>
);
})
}
</span>
);
}
}