scinote-web/app/javascript/packs/shared/navigation/components/ActivityDateElement.jsx

15 lines
392 B
React
Raw Normal View History

2017-08-02 23:27:05 +08:00
import React from "react";
import PropTypes from "prop-types";
import { FormattedDate } from "react-intl";
2017-08-07 19:51:22 +08:00
const ActivityDateElement = ({ date }) =>
<li className="data-element">
<FormattedDate value={date} day="2-digit" month="2-digit" year="numeric" />
</li>;
2017-08-02 23:27:05 +08:00
ActivityDateElement.propTypes = {
2017-08-07 19:51:22 +08:00
date: PropTypes.instanceOf(Date).isRequired
};
2017-08-02 23:27:05 +08:00
export default ActivityDateElement;