Commit be7e83db authored by Matthew Taylor's avatar Matthew Taylor

Change avatar to use `uploads` endpoint

parent 425f2273
...@@ -32,7 +32,8 @@ var Grid = React.createClass({ ...@@ -32,7 +32,8 @@ var Grid = React.createClass({
if (this.props.itemType == 'projects') { if (this.props.itemType == 'projects') {
return ( return (
<Thumbnail key={key} <Thumbnail
key={key}
showLoves={this.props.showLoves} showLoves={this.props.showLoves}
showFavorites={this.props.showFavorites} showFavorites={this.props.showFavorites}
showRemixes={this.props.showRemixes} showRemixes={this.props.showRemixes}
...@@ -42,23 +43,29 @@ var Grid = React.createClass({ ...@@ -42,23 +43,29 @@ var Grid = React.createClass({
href={href} href={href}
title={item.title} title={item.title}
src={item.image} src={item.image}
avatar={'https://cdn2.scratch.mit.edu/get_image/user/' avatar={
+ item.author.id + '_32x32.png'} 'https://uploads.scratch.mit.edu/users/avatars/' +
item.author.id +
'.png'
}
creator={item.author.username} creator={item.author.username}
loves={item.stats.loves} loves={item.stats.loves}
favorites={item.stats.favorites} favorites={item.stats.favorites}
remixes={item.stats.remixes} remixes={item.stats.remixes}
views={item.stats.views} /> views={item.stats.views}
/>
); );
} }
else { else {
return ( return (
<Thumbnail key={key} <Thumbnail
key={key}
type={'gallery'} type={'gallery'}
href={href} href={href}
title={item.title} title={item.title}
src={item.image} src={item.image}
owner={item.owner} /> 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