{"size": 968, "ext": "js", "max_stars_repo_path": "packages/app/src/views/CollectionView/View.js", "max_stars_repo_name": "OffCourse/offcourse-next", "max_stars_repo_stars_event_min_datetime": "2018-04-24T08:42:53.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-10T21:04:36.000Z", "max_issues_repo_path": "packages/app/src/views/CollectionView/View.js", "max_issues_repo_name": "mjjenkins1981/offcourse-next", "max_issues_repo_issues_event_min_datetime": "2018-06-03T22:01:13.000Z", "max_issues_repo_issues_event_max_datetime": "2018-08-29T11:04:55.000Z", "max_forks_repo_path": "packages/app/src/views/CollectionView/View.js", "max_forks_repo_name": "mjjenkins1981/offcourse-next", "max_forks_repo_forks_event_min_datetime": "2018-06-05T13:17:28.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-10T15:50:25.000Z"}
{"max_stars_count": 22, "max_issues_count": 14, "max_forks_count": 4, "avg_line_length": 30.25, "max_line_length": 69, "alphanum_fraction": 0.6632231405}
import React, { Component } from "react";
import { CourseCardLayout } from "@offcourse/organisms";
import PropTypes from "prop-types";

export default class View extends Component {
  static propTypes = {
    courseCard: PropTypes.object.isRequired,
    handlers: PropTypes.object.isRequired,
    collection: PropTypes.object.isRequired
  };

  render() {
    const { courseCard, handlers, collection } = this.props;
    const { goToCheckpoint, goToCollection, goToCourse } = handlers;

    return (
      <CourseCardLayout
        initialCardLevel={courseCard.initialLevel}
        onResize={courseCard.changeLevel}
        key={courseCard.initialLevel}
        layout={courseCard.layout}
        goToCollection={goToCollection}
        goToCourse={goToCourse}
        goToCheckpoint={goToCheckpoint}
        hasMore={collection.hasMore}
        courses={collection.courses}
        loadMore={collection.loadMore}
      />
    );
  }
}
