mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-03 20:31:43 -05:00
Change avatar to use uploads
endpoint
This commit is contained in:
parent
425f22735a
commit
be7e83db78
1 changed files with 30 additions and 23 deletions
|
@ -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))}
|
||||||
|
|
Loading…
Reference in a new issue