Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (39 sloc) 968 Bytes
'use strict';
var React = require('react');
var Router = require('react-router');
var Link = Router.Link;
var SpotifyAlbumCover = React.createClass({
render: function() {
var url;
try {
url = this.props.model.images[1].url;
} catch(e) {
return false;
}
return (
<figure {...this.props}>
<img className='img-responsive img-rounded' src={url} />
</figure>
);
}
});
module.exports = React.createClass({
render: function() {
if (!this.props.model) {
return false;
}
var model = this.props.model;
var query = this.props.meta.query;
return (
<article className='row'>
<Link to="/" query={query}>
<SpotifyAlbumCover className='col-xs-3' model={model.album} />
<div className='col-xs-9'>
<h2 className='h5'>{model.album.name}</h2>
<h1 className='h4'>{model.name}</h1>
</div>
</Link>
</article>
);
}
});
You can’t perform that action at this time.