interface CommentNodeProps {
node: CommentNodeI;
+ noBorder?: boolean;
noIndent?: boolean;
viewOnly?: boolean;
locked?: boolean;
>
<div
id={`comment-${node.comment.id}`}
- className={`details comment-node border-top border-light py-2 ${
- this.isCommentNew ? 'mark' : ''
- }`}
+ className={`details comment-node py-2 ${
+ !this.props.noBorder ? 'border-top border-light' : ''
+ } ${this.isCommentNew ? 'mark' : ''}`}
style={
!this.props.noIndent &&
this.props.node.comment.parent_id &&
moderators?: Array<CommunityUser>;
admins?: Array<UserView>;
postCreatorId?: number;
+ noBorder?: boolean;
noIndent?: boolean;
viewOnly?: boolean;
locked?: boolean;
<CommentNode
key={node.comment.id}
node={node}
+ noBorder={this.props.noBorder}
noIndent={this.props.noIndent}
viewOnly={this.props.viewOnly}
locked={this.props.locked}
return (
<div>
{combined.map(i => (
- <div>
- {i.type === 'posts' ? (
- <PostListing
- post={i.data as Post}
- admins={this.props.admins}
- showCommunity
- enableDownvotes={this.props.enableDownvotes}
- enableNsfw={this.props.enableNsfw}
- />
- ) : (
- <CommentNodes
- nodes={[{ comment: i.data as Comment }]}
- admins={this.props.admins}
- noIndent
- showContext
- enableDownvotes={this.props.enableDownvotes}
- />
- )}
- </div>
+ <>
+ <div>
+ {i.type === 'posts' ? (
+ <PostListing
+ post={i.data as Post}
+ admins={this.props.admins}
+ showCommunity
+ enableDownvotes={this.props.enableDownvotes}
+ enableNsfw={this.props.enableNsfw}
+ />
+ ) : (
+ <CommentNodes
+ nodes={[{ comment: i.data as Comment }]}
+ admins={this.props.admins}
+ noBorder
+ noIndent
+ showCommunity
+ showContext
+ enableDownvotes={this.props.enableDownvotes}
+ />
+ )}
+ </div>
+ <hr class="my-3" />
+ </>
))}
</div>
);
nodes={commentsToFlatNodes(this.state.comments)}
admins={this.props.admins}
noIndent
+ showCommunity
showContext
enableDownvotes={this.props.enableDownvotes}
/>
return (
<div>
{this.state.posts.map(post => (
- <PostListing
- post={post}
- admins={this.props.admins}
- showCommunity
- enableDownvotes={this.props.enableDownvotes}
- enableNsfw={this.props.enableNsfw}
- />
+ <>
+ <PostListing
+ post={post}
+ admins={this.props.admins}
+ showCommunity
+ enableDownvotes={this.props.enableDownvotes}
+ enableNsfw={this.props.enableNsfw}
+ />
+ <hr class="my-3" />
+ </>
))}
</div>
);