import React from "react";
import ReactDOM from "react-dom";
import Card from "../Card/";
import data from "../../data.json";

class CardList extends React.Component {

    constructor(props) {
        super(props);
        this.state = { cards: data.cards };
    }

    remove() {

    }
    render() {
        return (
            <div>
                {
                    this.state.cards.map((card, index) => {
                        return <Card
                            key={index}
                            title={card.title}
                            content={card.content}
                            dataclick={this.remove}
                        />
                    })
                  
                });
            }

            </div>
        );
    }

}
export default CardList;

