import classes from './styles.module.scss';
import DistrictTitle from './DistrictTitle';
import ContestSection from './ContestSection';
const District = function District(props) {
  const {
    districtNumber,
    contests,
    isAllParty,
    stateFips
  } = props;
  return <div className={classes.container}>
      <DistrictTitle districtNumber={districtNumber} stateFips={stateFips} contestId={contests[0].id} showContestMeta={isAllParty} />
      <div className={classes['contests-container']}>
        {contests.map(contest => <ContestSection contest={contest} key={contest.id || contest.note} />)}
      </div>
    </div>;
};
export default District;