Files
remark42/frontend/app/components/list-comments/list-comments.tsx
T
2022-04-10 15:34:54 -05:00

32 lines
680 B
TypeScript

import { h } from 'preact';
import { useIntl } from 'react-intl';
import type { Comment as CommentType } from 'common/types';
import { Comment } from 'components/comment';
type Props = {
comments: CommentType[];
};
export function ListComments({ comments = [] }: Props) {
const intl = useIntl();
return (
<div className="comments-list">
{comments.map((comment) => (
<Comment
intl={intl}
key={comment.id}
data={comment}
level={0}
view="preview"
mix="list-comments__item"
user={null}
theme="light"
isCommentsDisabled={false}
/>
))}
</div>
);
}