mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
28 lines
599 B
React
28 lines
599 B
React
|
import React from "react";
|
||
|
import PropTypes from "prop-types";
|
||
|
import { FormattedTime } from "react-intl";
|
||
|
|
||
|
const ActivityElement = ({ activity }) => {
|
||
|
return (
|
||
|
<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;
|