File size: 750 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import ArticleActions from './ArticleActions';
import { Link } from 'react-router-dom';
import React from 'react';
const ArticleMeta = props => {
const article = props.article;
return (
<div className="article-meta">
<Link to={`/@${article.author.username}`}>
<img src={article.author.image} alt={article.author.username} />
</Link>
<div className="info">
<Link to={`/@${article.author.username}`} className="author">
{article.author.username}
</Link>
<span className="date">
{new Date(article.createdAt).toDateString()}
</span>
</div>
<ArticleActions canModify={props.canModify} article={article} />
</div>
);
};
export default ArticleMeta;
|