import { Component } from 'inferno';
-import { CommentSortType } from '../interfaces';
+import { CommentSortType, CommentNode as CommentNodeI } from '../interfaces';
import {
- CommentNode as CommentNodeI,
- CommunityUser,
- UserView,
+ CommunityModeratorView,
+ UserViewSafe,
SortType,
} from 'lemmy-js-client';
import { commentSort, commentSortSortType } from '../utils';
interface CommentNodesProps {
nodes: CommentNodeI[];
- moderators?: CommunityUser[];
- admins?: UserView[];
+ moderators?: CommunityModeratorView[];
+ admins?: UserViewSafe[];
postCreatorId?: number;
noBorder?: boolean;
noIndent?: boolean;
<div className="comments">
{this.sorter().map(node => (
<CommentNode
- key={node.comment.id}
+ key={node.comment_view.comment.id}
node={node}
noBorder={this.props.noBorder}
noIndent={this.props.noIndent}