// @flow import * as React from 'react'; import relativeDate from 'tiny-relative-date'; type CommentListProps = { comments: {}, fetchList: string => void, uri: string, isLoading: boolean, }; type CommentProps = { commentId: string, claimId: string, author: string, message: string, timePosted: number, }; class CommentList extends React.PureComponent { componentDidMount() { this.fetchComments(this.props); } fetchComments = (props: Props) => { const { fetchList, uri } = props; fetchList(uri); }; render() { const { comments } = this.props; if (!comments) { return null; } return ( ); } } class Comment extends React.PureComponent { render() { return (
  • {this.props.author}
    {this.props.message}
  • ); } } export default CommentList;