Skip to content

Commit

Permalink
Hide promote post button on direct comment links
Browse files Browse the repository at this point in the history
  • Loading branch information
James Calfee committed Aug 30, 2016
1 parent afcf9ef commit 464ae96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/components/cards/PostFull.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ export default class PostFull extends React.Component {
</ul>
</div>
}

const firstPayout = post_content.get('mode') === "first_payout"
const rootComment = post_content.get('depth') == 0

return (
<article className="PostFull hentry" itemScope itemType ="http://schema.org/blogPost">
Expand All @@ -243,7 +245,7 @@ export default class PostFull extends React.Component {
</div>
}

{username && firstPayout && <div className="float-right">
{username && firstPayout && rootComment && <div className="float-right">
<button className="button hollow tiny" onClick={this.showPromotePost}>Promote</button>
</div>}
<TagList post={content} horizontal />
Expand Down

0 comments on commit 464ae96

Please sign in to comment.