]> Untitled Git - lemmy.git/blob - ui/src/components/comment-nodes.tsx
Adding emoji support.
[lemmy.git] / ui / src / components / comment-nodes.tsx
1 import { Component } from 'inferno';
2 import { CommentNode as CommentNodeI, CommunityUser, UserView } from '../interfaces';
3 import { CommentNode } from './comment-node';
4
5 interface CommentNodesState {
6 }
7
8 interface CommentNodesProps {
9   nodes: Array<CommentNodeI>;
10   moderators?: Array<CommunityUser>;
11   admins?: Array<UserView>;
12   noIndent?: boolean;
13   viewOnly?: boolean;
14   locked?: boolean;
15   markable?: boolean;
16 }
17
18 export class CommentNodes extends Component<CommentNodesProps, CommentNodesState> {
19
20   constructor(props: any, context: any) {
21     super(props, context);
22   }
23
24   render() {
25     return (
26       <div className="comments">
27         {this.props.nodes.map(node =>
28           <CommentNode node={node} 
29             noIndent={this.props.noIndent} 
30             viewOnly={this.props.viewOnly} 
31             locked={this.props.locked} 
32             moderators={this.props.moderators}
33             admins={this.props.admins}
34             markable={this.props.markable}
35           />
36         )}
37       </div>
38     )
39   }
40
41 }
42