{"size": 213, "ext": "js", "max_stars_repo_path": "part2/coursecontent/src/components/Total.js", "max_stars_repo_name": "Maniktherana/fullstack-open-2021", "max_stars_repo_stars_event_min_datetime": "2022-01-24T00:36:07.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-24T00:36:17.000Z", "max_issues_repo_path": "part2/coursecontent/src/components/Total.js", "max_issues_repo_name": "Maniktherana/fullstack-open-2021", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "part2/coursecontent/src/components/Total.js", "max_forks_repo_name": "Maniktherana/fullstack-open-2021", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.3636363636, "max_line_length": 58, "alphanum_fraction": 0.6056338028}
import React from 'react'

const Total = ( {parts} ) => {
  const total = parts.reduce((s, p) => s + p.exercises, 0)

  return (
    <p><strong>total of {total} exercises</strong></p>
  )
  }

export default Total