Skip to content
Snippets Groups Projects
Commit 8edf6444 authored by bitcoiner's avatar bitcoiner Committed by Valentine Zavgorodnev
Browse files

Show Resteemed on Blog (#426)

parent 58c7762a
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,7 @@ export default class PostSummary extends React.Component { ...@@ -52,6 +52,7 @@ export default class PostSummary extends React.Component {
render() { render() {
const {currentCategory, thumbSize, ignore, onClick} = this.props; const {currentCategory, thumbSize, ignore, onClick} = this.props;
const {post, content, pending_payout, total_payout} = this.props; const {post, content, pending_payout, total_payout} = this.props;
const {account} = this.props;
if (!content) return null; if (!content) return null;
const archived = content.get('mode') === 'archived' const archived = content.get('mode') === 'archived'
...@@ -63,6 +64,12 @@ export default class PostSummary extends React.Component { ...@@ -63,6 +64,12 @@ export default class PostSummary extends React.Component {
</div> </div>
} }
if(account && account != content.get('author')) {
reblogged_by = <div className="PostSummary__reblogged_by">
<Icon name="reblog" /> Resteemed
</div>
}
const {gray, pictures, authorRepLog10, hasFlag} = content.get('stats', Map()).toJS() const {gray, pictures, authorRepLog10, hasFlag} = content.get('stats', Map()).toJS()
const p = extractContent(immutableAccessor, content); const p = extractContent(immutableAccessor, content);
let desc = p.desc let desc = p.desc
......
...@@ -154,12 +154,13 @@ class PostsList extends React.Component { ...@@ -154,12 +154,13 @@ class PostsList extends React.Component {
render() { render() {
const {posts, loading, category, emptyText} = this.props; const {posts, loading, category, emptyText} = this.props;
const {comments} = this.props const {comments} = this.props
const {account} = this.props
const {thumbSize, showPost} = this.state const {thumbSize, showPost} = this.state
if (!loading && !posts.length && emptyText) { if (!loading && !posts.length && emptyText) {
return <Callout body={emptyText} type="success" />; return <Callout body={emptyText} type="success" />;
} }
const renderSummary = items => items.map(({item, ignore, netVoteSign, authorRepLog10}) => <li key={item}> const renderSummary = items => items.map(({item, ignore, netVoteSign, authorRepLog10}) => <li key={item}>
<PostSummary post={item} currentCategory={category} thumbSize={thumbSize} <PostSummary account={account} post={item} currentCategory={category} thumbSize={thumbSize}
ignore={ignore} netVoteSign={netVoteSign} authorRepLog10={authorRepLog10} onClick={this.onPostClick} /> ignore={ignore} netVoteSign={netVoteSign} authorRepLog10={authorRepLog10} onClick={this.onPostClick} />
</li>) </li>)
return ( return (
......
...@@ -163,6 +163,7 @@ export default class UserProfile extends React.Component { ...@@ -163,6 +163,7 @@ export default class UserProfile extends React.Component {
if (account.blog) { if (account.blog) {
tab_content = <PostsList tab_content = <PostsList
emptyText={`Looks like ${account.name} hasn't started blogging yet!`} emptyText={`Looks like ${account.name} hasn't started blogging yet!`}
account={account.name}
posts={account.blog} posts={account.blog}
loading={fetching} loading={fetching}
category="blog" category="blog"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment