summaryrefslogtreecommitdiffstats
path: root/ui/src/components/comment-node.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-02-07 23:05:15 -0500
committerDessalines <tyhou13@gmx.com>2020-02-07 23:05:15 -0500
commitecd10482a6815fc3b51b2da7cd5f494c01c385e6 (patch)
tree16d25467ba4224bfd807122806d1f77ddfaee6e8 /ui/src/components/comment-node.tsx
parent779a72581c4c1dee846296cd0f3ea761914aedc6 (diff)
Add new comments views to main and community pages. Fixes #480
Diffstat (limited to 'ui/src/components/comment-node.tsx')
-rw-r--r--ui/src/components/comment-node.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx
index 3296a5c8..a67b1c35 100644
--- a/ui/src/components/comment-node.tsx
+++ b/ui/src/components/comment-node.tsx
@@ -58,7 +58,9 @@ interface CommentNodeProps {
markable?: boolean;
moderators: Array<CommunityUser>;
admins: Array<UserView>;
+ // TODO is this necessary, can't I get it from the node itself?
postCreatorId?: number;
+ showCommunity?: boolean;
}
export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
@@ -205,6 +207,14 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<span>) </span>
</span>
</li>
+ {this.props.showCommunity && (
+ <li className="list-inline-item">
+ <span> {i18n.t('to')} </span>
+ <Link to={`/c/${node.comment.community_name}`}>
+ {node.comment.community_name}
+ </Link>
+ </li>
+ )}
<li className="list-inline-item">
<span>
<MomentTime data={node.comment} />