diff options
Diffstat (limited to 'webapp/components/post_view/components/date_separator.jsx')
-rw-r--r-- | webapp/components/post_view/components/date_separator.jsx | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/webapp/components/post_view/components/date_separator.jsx b/webapp/components/post_view/components/date_separator.jsx index 18dc0c7ff..4648f456c 100644 --- a/webapp/components/post_view/components/date_separator.jsx +++ b/webapp/components/post_view/components/date_separator.jsx @@ -1,27 +1,26 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {FormattedDate} from 'react-intl'; -export default class DateSeparator extends React.Component { - render() { - return ( - <div - className='date-separator' - > - <hr className='separator__hr'/> - <div className='separator__text'> - <FormattedDate - value={this.props.date} - weekday='short' - month='short' - day='2-digit' - year='numeric' - /> - </div> +export default function DateSeparator(props) { + return ( + <div + className='date-separator' + > + <hr className='separator__hr'/> + <div className='separator__text'> + <FormattedDate + value={props.date} + weekday='short' + month='short' + day='2-digit' + year='numeric' + /> </div> - ); - } + </div> + ); } DateSeparator.propTypes = { - date: React.PropTypes.instanceOf(Date) + date: PropTypes.instanceOf(Date) }; |