Created
April 27, 2020 20:26
-
-
Save Porter97/7fc397feb5300d4fcf1b1b519b8cbe12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Link } from 'react-router-dom'; | |
import CollectionActions from './CollectionActions'; | |
const CollectionMeta = props => { | |
const collection = props.collection; | |
return ( | |
<div className="collection-meta"> | |
<Link to={`/@${collection.author.username}`}> | |
<img src={collection.author.image} alt={collection.author.username} /> | |
</Link> | |
<div className="info"> | |
<Link to={`/@${collection.author.username}`} className="author"> | |
{collection.author.username} | |
</Link> | |
<span className="date"> | |
{new Date(collection.createdAt).toDateString()} | |
</span> | |
</div> | |
<CollectionActions canModify={props.canModify} collection={collection} /> | |
</div> | |
) | |
} | |
export default CollectionMeta; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment