import React from "react";
import propTypes from "prop-types";
import SportInfoCard from "./SportInfoCard";
import "../styles/MatchInfoCardDisplay.css";
export default class SportInfoCardDisplay extends React.Component {
    constructor(props) {
        super(props);
    }
    render() {
        let sports = null;
        if(this.props.recommendedsports && this.props.recommendedsports.length > 0) {
            sports = this.props.recommendedsports.map((sport) => <SportInfoCard key={sport._id} sport={sport}></SportInfoCard>);
        }
        return (
            <div className="horizontal-scroller">
                {sports}
            </div>
        );
    }
}

SportInfoCardDisplay.propTypes = {
    recommendedsports: propTypes.array,
};