scinote-web/app/javascript/packs/shared/navigation/components/ActivityElement.jsx
2017-08-07 13:51:22 +02:00

24 lines
559 B
JavaScript

import React from "react";
import PropTypes from "prop-types";
import { FormattedTime } from "react-intl";
const ActivityElement = ({ activity }) =>
<li>
<span>
<FormattedTime
value={activity.created_at}
hour="numeric"
minute="numeric"
/>
</span>
<span dangerouslySetInnerHTML={{ __html: activity.message }} />
</li>;
ActivityElement.propTypes = {
activity: PropTypes.shape({
message: PropTypes.string.isRequired,
created_at: PropTypes.string.isRequired
})
};
export default ActivityElement;