import classes from './styles.module.scss';
import EventDetails from './EventDetails';
const ElectionEventList = function ElectionEventList(props) {
  const {
    events,
    office,
    tracking
  } = props;
  if (!events) {
    return null;
  }
  return <div className={classes.container}>
      <div className={classes.list}>
        {events.map(event => <EventDetails notes={event.notes} state={event.state} parties={event.parties} key={event.id} stateFips={event.stateFips} office={office} tracking={tracking} />)}
      </div>
    </div>;
};
export default ElectionEventList;