diff --git a/webclient/src/Article.js b/webclient/src/Article.js index 33c1647..ec48385 100644 --- a/webclient/src/Article.js +++ b/webclient/src/Article.js @@ -62,7 +62,7 @@ class Article extends React.Component { :

loading...

} - + } diff --git a/webclient/src/Comments.js b/webclient/src/Comments.js index 1d24daf..3910f28 100644 --- a/webclient/src/Comments.js +++ b/webclient/src/Comments.js @@ -33,16 +33,20 @@ class Article extends React.Component { ); } - displayComment(c, level) { + displayComment(story, c, level) { return (
-

{c.author || '[Deleted]'} | {moment.unix(c.date).fromNow()}

+

{c.author === story.author ? '[OP]' : ''} {c.author || '[Deleted]'} | {moment.unix(c.date).fromNow()}

- {c.comments.map(i => this.displayComment(i, level + 1))} + {level < 6 ? + c.comments.map(i => this.displayComment(story, i, level + 1)) + : +

[replies snipped]

+ }
); } @@ -69,7 +73,7 @@ class Article extends React.Component { {infoLine(story)}
- {story.comments.map(c => this.displayComment(c, 0))} + {story.comments.map(c => this.displayComment(story, c, 0))}
: