Files
frontend-app-discussions/src/discussions/comments/CommentsView.jsx
Kshitij Sobti 491f7b7acd Basic discussions forum framework
Adds the basic structure for the Discussions MFE around which future development
will happen.
2020-10-21 23:59:23 +05:30

20 lines
464 B
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import Comment, { commentShape } from './comment/Comment';
function CommentsView({ comments }) {
return (
<div className="discussion-comments d-flex flex-column">
{
comments.map(comment => <Comment comment={comment} key={comment.id} />)
}
</div>
);
}
CommentsView.propTypes = {
comments: PropTypes.arrayOf(commentShape).isRequired,
};
export default CommentsView;