{"size": 968, "ext": "js", "max_stars_repo_path": "src/components/SodaList.js", "max_stars_repo_name": "jeffdinsmore/Soda-Fountain-Redux", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/SodaList.js", "max_issues_repo_name": "jeffdinsmore/Soda-Fountain-Redux", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/SodaList.js", "max_forks_repo_name": "jeffdinsmore/Soda-Fountain-Redux", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.4736842105, "max_line_length": 60, "alphanum_fraction": 0.5723140496}
import React from "react";
import Soda from "./Soda";
import PropTypes from "prop-types";

function SodaList(props) {
  return (
    <React.Fragment>
      <div class="flex-container">
        {Object.values(props.sodaList).map((soda) =>
          <div>
            <Soda
              whenSodaClicked={props.onSodaSelection}
              name={soda.name}
              brand={soda.brand}
              sugarContent={soda.sugarContent}
              pints={soda.pints}
              price={soda.price}
              id={soda.id}
              key={soda.id}
              whenSodaSellClicked={props.onClickingSellPint}
              whenSodaRefillClicked={props.onClickingRefill}
            />
          </div>
        )}
      </div>
      <hr />
    </React.Fragment>
  );
}

SodaList.propTypes = {
  sodaList: PropTypes.object,
  onSodaSelection: PropTypes.func,
  onClickingSellPint: PropTypes.func,
  onClickingRefill: PropTypes.func
};

export default SodaList;