Skip to content

Instantly share code, notes, and snippets.

@BrightnBubbly
Created April 20, 2020 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrightnBubbly/f0e6762c26d5a08fa257112e7d4f26dd to your computer and use it in GitHub Desktop.
Save BrightnBubbly/f0e6762c26d5a08fa257112e7d4f26dd to your computer and use it in GitHub Desktop.
{messageData.map((message)=>{
return(
<div key={message.id} className={`row msg_container ${message.user.id == 'admin' ? 'base_sent': 'base_receive'}`}>
<div className="col-md-10 col-xs-10">
<div className="messages msg_sent">
<p>{message.text}</p>
<time dateTime={message.created_at}>{message.user.name}</time>
</div>
</div>
</div>
);
})}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment