{"size": 786, "ext": "js", "max_stars_repo_path": "src/KegList.js", "max_stars_repo_name": "freiland/tap-room-redux", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/KegList.js", "max_issues_repo_name": "freiland/tap-room-redux", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/KegList.js", "max_forks_repo_name": "freiland/tap-room-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": 19.65, "max_line_length": 51, "alphanum_fraction": 0.6246819338}
import React from 'react';
import PropTypes from 'prop-types';
import Keg from './Keg';
import NewKegForm from './NewKegForm';


function KegList(props) {

  function handlePouringKegSubmission(event) {
    event.preventDefault();
    console.log(event.target.quantity.value);
  }

  return (
    <React.Fragment>
      <hr />
      
      {Object.values(props.KegList).map((keg) =>
        <Keg
          whenKegClicked = { props.onKegSelection }
          name={keg.name}
          pintsAvail={keg.pintsAvail}
          id={ticket.id}
          key={ticket.id}/>
      )}
      
    </React.Fragment>
  );
};

KegList.propTypes = {
  kegList: PropTypes.object, 
  onKegSelection: PropTypes.func,
  onPourKeg: PropTypes.func, 
  onStockKeg: PropTypes.func

}

export default KegList; 
