{"size": 646, "ext": "js", "max_stars_repo_path": "src/components/pages/profile/on/subpages/education/subpages/read/index.js", "max_stars_repo_name": "fernandocamargo/future", "max_stars_repo_stars_event_min_datetime": "2020-01-21T16:10:11.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-21T12:21:43.000Z", "max_issues_repo_path": "src/components/pages/profile/on/subpages/education/subpages/read/index.js", "max_issues_repo_name": "fernandocamargo/future", "max_issues_repo_issues_event_min_datetime": "2021-03-10T01:08:29.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T15:43:39.000Z", "max_forks_repo_path": "src/components/pages/profile/on/subpages/education/subpages/read/index.js", "max_forks_repo_name": "fernandocamargo/future", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 5, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 19.5757575758, "max_line_length": 65, "alphanum_fraction": 0.5959752322}
import { arrayOf, shape, string } from 'prop-types';
import React, { useCallback } from 'react';

import Education from './education';

const Read = ({ profile: { educations = [] } }) => {
  const renderEducation = useCallback(
    education => <Education key={education.id} {...education} />,
    []
  );

  return (
    <div>
      <h1>My CV / Education</h1>
      {!!educations.length && educations.map(renderEducation)}
    </div>
  );
};

Read.propTypes = {
  profile: shape({
    educations: arrayOf(
      shape({
        id: string.isRequired,
      }).isRequired
    ),
  }).isRequired,
};

Read.defaultProps = {};

export default Read;
