Commit be7e83db authored by Matthew Taylor's avatar Matthew Taylor

Change avatar to use `uploads` endpoint

parent 425f2273
...@@ -32,33 +32,40 @@ var Grid = React.createClass({ ...@@ -32,33 +32,40 @@ var Grid = React.createClass({
if (this.props.itemType == 'projects') { if (this.props.itemType == 'projects') {
return ( return (
<Thumbnail key={key} <Thumbnail
showLoves={this.props.showLoves} key={key}
showFavorites={this.props.showFavorites} showLoves={this.props.showLoves}
showRemixes={this.props.showRemixes} showFavorites={this.props.showFavorites}
showViews={this.props.showViews} showRemixes={this.props.showRemixes}
showAvatar={this.props.showAvatar} showViews={this.props.showViews}
type={'project'} showAvatar={this.props.showAvatar}
href={href} type={'project'}
title={item.title} href={href}
src={item.image} title={item.title}
avatar={'https://cdn2.scratch.mit.edu/get_image/user/' src={item.image}
+ item.author.id + '_32x32.png'} avatar={
creator={item.author.username} 'https://uploads.scratch.mit.edu/users/avatars/' +
loves={item.stats.loves} item.author.id +
favorites={item.stats.favorites} '.png'
remixes={item.stats.remixes} }
views={item.stats.views} /> creator={item.author.username}
loves={item.stats.loves}
favorites={item.stats.favorites}
remixes={item.stats.remixes}
views={item.stats.views}
/>
); );
} }
else { else {
return ( return (
<Thumbnail key={key} <Thumbnail
type={'gallery'} key={key}
href={href} type={'gallery'}
title={item.title} href={href}
src={item.image} title={item.title}
owner={item.owner} /> src={item.image}
owner={item.owner}
/>
); );
} }
}.bind(this))} }.bind(this))}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment