Sha256: a7963de9685f3ac5b612ea34e50c43b834632e1cce1f3b06cf2f3cb3fccc5e1e
Contents?: true
Size: 675 Bytes
Versions: 1
Compression:
Stored size: 675 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> ( <a href={`/admin/articles/${comment.articleId}/comments/${ comment.id }/edit`} > edit </a> ) <br /> {comment.text} </p> ); } Comment.propTypes = { comment: PropTypes.instanceOf(CommentModel).isRequired }; export default Comment;
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
loco-rails-3.0.4 | test/dummy/frontend/js/components/admin/Comment.js |