Sha256: 03593bf652f177b8a185e2e9a65b34cc8ed9692ac176b6a530295835e7ccdf0b
Contents?: true
Size: 534 Bytes
Versions: 2
Compression:
Stored size: 534 Bytes
Contents
import React from "react"; import PropTypes from "prop-types"; import CommentModel from "models/article/Comment"; import Comment from "components/admin/comment"; function CommentList({ comments }) { if (comments.length === 0) { return <p>No comments</p>; } return ( <> {comments.map(comment => ( <Comment comment={comment} key={comment.id} /> ))} </> ); } CommentList.propTypes = { comments: PropTypes.arrayOf(PropTypes.instanceOf(CommentModel)).isRequired }; export default CommentList;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
loco-rails-3.0.5 | test/dummy/frontend/js/components/admin/CommentList.js |
loco-rails-3.0.4 | test/dummy/frontend/js/components/admin/CommentList.js |