summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorErnest <ernestwisniewski2@gmail.com>2020-07-12 17:26:10 +0200
committerErnest <ernestwisniewski2@gmail.com>2020-07-12 17:26:10 +0200
commitb037ff922ce84b98f0a1b1fcd21273af0450a03a (patch)
tree8684a8f64595ec04438e6a175c6b96164f2259ef /ui
parent74655de6180d53e8c5f7a4cf156b471de181bf21 (diff)
Add post title to comments view #948
Diffstat (limited to 'ui')
-rw-r--r--ui/src/components/comment-node.tsx9
-rw-r--r--ui/src/interfaces.ts1
2 files changed, 10 insertions, 0 deletions
diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx
index 82af0bbe..cca235ab 100644
--- a/ui/src/components/comment-node.tsx
+++ b/ui/src/components/comment-node.tsx
@@ -222,6 +222,15 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<MomentTime data={node.comment} />
</span>
</div>
+ {this.props.showCommunity && !this.state.collapsed && (
+ <>
+ <div class="md-div text-muted small">
+ <Link class="mr-2" to={`/post/${node.comment.post_id}`}>
+ {node.comment.post_name}
+ </Link>
+ </div>
+ </>
+ )}
{/* end of user row */}
{this.state.showEdit && (
<CommentForm
diff --git a/ui/src/interfaces.ts b/ui/src/interfaces.ts
index 774836a2..2b4b5e70 100644
--- a/ui/src/interfaces.ts
+++ b/ui/src/interfaces.ts
@@ -211,6 +211,7 @@ export interface Comment {
local: boolean;
creator_id: number;
post_id: number;
+ post_name: string;
parent_id?: number;
content: string;
removed: boolean;