Sha256: f600c5efe15d169f4b0cb1b33c94a89eae54710302bbe17faeaba767b49443b1
Contents?: true
Size: 529 Bytes
Versions: 2
Compression:
Stored size: 529 Bytes
Contents
import React from "react"; import PropTypes from "prop-types"; import { Services } from "loco-js"; import CommentModel from "models/article/Comment"; function Comment({ comment }) { const createdAt = new Services.Date(comment.createdAt).strftime("%d %b %y"); return ( <p id={`comment_${comment.id}`}> <b>{comment.author}</b> on <i>{createdAt}</i> wrote: <br /> {comment.text} </p> ); } Comment.propTypes = { comment: PropTypes.instanceOf(CommentModel).isRequired }; export default Comment;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
loco-rails-3.0.5 | test/dummy/frontend/js/components/main/Comment.js |
loco-rails-3.0.4 | test/dummy/frontend/js/components/main/Comment.js |