{"size": 1559, "ext": "js", "max_stars_repo_path": "client/src/components/MyRecommendations.js", "max_stars_repo_name": "RKRitik/Book-Recommendation-Website", "max_stars_repo_stars_event_min_datetime": "2020-10-21T15:46:44.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-13T14:10:54.000Z", "max_issues_repo_path": "client/src/components/MyRecommendations.js", "max_issues_repo_name": "RKRitik/Book-Recommendation-Website", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/components/MyRecommendations.js", "max_forks_repo_name": "RKRitik/Book-Recommendation-Website", "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": 25.5573770492, "max_line_length": 79, "alphanum_fraction": 0.5580500321}
import React, { Component } from "react";
import LoadingComponent from "./LoadingComponent";
import {
  Card,
  CardImg,
  CardImgOverlay,
  CardTitle,
  Breadcrumb,
  Alert,
  BreadcrumbItem
} from "reactstrap";
import { Link } from "react-router-dom";
class Recommend extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  componentDidUpdate() {
    // if (this.props.auth.user != null)
    //     this.props.getRecommendations(this.props.auth.user.id);
  }
  render() {
    // const recommendations = this.props.recommend.recommendations.map(re => {
    //     return (
    //         <div key={re.id} className="col-12 col-md-5 m-1">
    //             {re.id} />
    //         </div>
    //     );
    // });
    const na = (
      <div className="col-12 ">
        <Alert color="danger">Oops No Content Available</Alert>
      </div>
    );

    return (
      <div className="container">
        <h1> Get Recommendations</h1>
        <div className="row">
          <Breadcrumb>
            <BreadcrumbItem>
              <Link to="/home">Home</Link>
            </BreadcrumbItem>
            <BreadcrumbItem active>My Recommendations</BreadcrumbItem>
          </Breadcrumb>
        </div>

        <div className="row row-content">
          {this.props.recommend.isLoading ? <LoadingComponent /> : null}
          {!this.props.recommend.isLoading &&
          this.props.recommend.recommendations.length === 0
            ? na
            : null}
        </div>
      </div>
    );
  }
}

export default Recommend;
