/* eslint-disable react/prop-types */
import { RecipeCard } from '../RecipeCard/index';

export const RecipeGrid = ({ recipes, onRecipeClick }) => (
    <div className="recipe-grid">
        {recipes?.map((recipe) => (
            <RecipeCard
            key={recipe.id}
            recipe={recipe}
            onClick={() => onRecipeClick(recipe)}
            />
        ))}
    </div>
);