Last active
May 17, 2017 17:30
-
-
Save domyen/0245748e8f5a6bc20df549a379777a9d to your computer and use it in GitHub Desktop.
CommentList.js NONREUSABLE
Raw
CommentList.js
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
Show hidden characters
import React from 'react'; | |
export default function CommentList({comments}) { | |
return ( | |
<div className="commentList"> | |
{comments.map(({commentText, characterName, characterAvatar, characterId}}) => ( | |
<div className="commentItem"> | |
<div className="avatar"><img src={characterAvatar} /></div> | |
<div className="message"> | |
<span className="author"><a href=`/character/${characterId}`>{characterName}</a></span> | |
<span>{commentText}</span> | |
</div> | |
</div> | |
))} | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment