Files
remark42/frontend/app/components/list-comments/list-comments.tsx
T
2019-04-28 19:27:36 +03:00

31 lines
680 B
TypeScript

/** @jsx h */
import { h } from 'preact';
import { NODE_ID } from '@app/common/constants';
import { Comment as CommentType } from '@app/common/types';
import { Comment } from '@app/components/comment';
interface Props {
comments: CommentType[];
}
export const ListComments = ({ comments = [] }: Props) => (
<div id={NODE_ID}>
<div className="list-comments">
{comments.map(comment => (
<Comment
data={comment}
level={0}
view="preview"
mix="list-comments__item"
user={null}
theme="light"
isCommentsDisabled={false}
post_info={null}
/>
))}
</div>
</div>
);