import React from 'react' import RecipeCard from './RecipeCard.jsx' const TIERS = [ { key: 'great', label: 'Great match', range: '≥ 75%', dot: '#4ADE80', test: r => r.match_percentage >= 75, }, { key: 'good', label: 'Good match', range: '50 – 74%', dot: '#FCD34D', test: r => r.match_percentage >= 50 && r.match_percentage < 75, }, { key: 'partial', label: 'Partial match', range: '< 50%', dot: '#D1D5DB', test: r => r.match_percentage < 50, }, ] export default function RecipeList({ recipes }) { if (!recipes || recipes.length === 0) { return (

No recipes found for these ingredients.

) } // rank is the global position across all tiers let globalRank = 0 return (

Recipe suggestions

{recipes.length} found
{TIERS.map(tier => { const group = recipes.filter(tier.test) if (group.length === 0) return null return (
{/* Tier header */}
{tier.label} {tier.range} {group.length}
{group.map(recipe => { globalRank++ return ( ) })}
) })}
) }