Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (16 sloc) 399 Bytes
import React from "react";
import "./Messages.css";
const Messages = ({data}) => (
<ul className="messages">
{data && data.map((msg, idx) => (
<li key={idx} className="message">
<div>
<strong>{msg.sender}:</strong>
<p>{msg.text}</p>
</div>
<div><time>{msg.formattedTime}</time></div>
</li>
))}
</ul>
);
export default Messages;
You can’t perform that action at this time.