{"size": 466, "ext": "js", "max_stars_repo_path": "src/components/RestaurantImage.js", "max_stars_repo_name": "joshuaswift/restaurant-roulette", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/RestaurantImage.js", "max_issues_repo_name": "joshuaswift/restaurant-roulette", "max_issues_repo_issues_event_min_datetime": "2018-09-19T07:57:36.000Z", "max_issues_repo_issues_event_max_datetime": "2018-09-23T19:45:56.000Z", "max_forks_repo_path": "src/components/RestaurantImage.js", "max_forks_repo_name": "joshuaswift/restaurant-roulette", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 23.3, "max_line_length": 80, "alphanum_fraction": 0.6394849785}
import React, { Component } from "react";
import { render } from "react-dom";
import "../css/style.css";

class RestaurantImage extends Component {
  render() {
    let imgArr = this.props.images;
    let random = Math.floor(Math.random() * imgArr.length);
    let placeholderImg = imgArr[random].url;

    return (
      <li>
        <img src={this.props.thumb || this.props.featImage || placeholderImg} />
      </li>
    );
  }
}

export default RestaurantImage;
