{"size": 539, "ext": "js", "max_stars_repo_path": "ww_react_list/js/src/components/Article.js", "max_stars_repo_name": "WebWash/ww-react-examples", "max_stars_repo_stars_event_min_datetime": "2019-11-04T10:35:11.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-06T22:41:07.000Z", "max_issues_repo_path": "ww_react_list/js/src/components/Article.js", "max_issues_repo_name": "WebWash/ww-react-examples", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ww_react_list/js/src/components/Article.js", "max_forks_repo_name": "WebWash/ww-react-examples", "max_forks_repo_forks_event_min_datetime": "2019-12-24T08:55:48.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-15T11:22:32.000Z"}
{"max_stars_count": 10, "max_issues_count": null, "max_forks_count": 5, "avg_line_length": 21.56, "max_line_length": 75, "alphanum_fraction": 0.6103896104}
import React from "react";

/**
 * Displays an article's title, created and body field.
 *
 * @param article
 * @param returnClick
 * @returns {*}
 * @constructor
 */
const Article = ({ article, returnClick }) => {
  const { attributes } = article;
  return (
    <div>
      <h3>{attributes.title}</h3>
      <span>{attributes.created}</span>
      <div dangerouslySetInnerHTML={{__html: attributes.body.processed}} />
      <hr />
      <a href="#" onClick={returnClick}>&lt; Back to list</a>
    </div>
  );
};

export default Article;
