
import { Card } from '../Card/Card';
import styles from './CardList.module.css';
import { CARDS } from './constants';

export const CardList = () => {

    let cards = [];

    for(let i = 0; i < 9; i += 1) {
        cards.push( 0 );
    }

    return (
        <div className={styles.container}>
            {/* todo: determine cardId  */}
            {CARDS.map((el, index) =>
                (<Card
                    fullname={el.fullname}
                    image_url={el.image_url || `/surfing/users/${el.cardId}.png`}
                    about={el.about}
                    date={el.date}
                    title={el.title}
                    text={el.text}
                    tag={el.tag}
                    key={index}
                    cardId={index}
                />))
            }
            
        </div>
    )
}