diff --git a/src/components/recipe-card/RecipeCard.tsx b/src/components/recipe-card/RecipeCard.tsx index 8e95277..39bccb0 100644 --- a/src/components/recipe-card/RecipeCard.tsx +++ b/src/components/recipe-card/RecipeCard.tsx @@ -4,6 +4,7 @@ export interface RecipeCardProps { title: string ownerUsername: string mainImageUrl: string + mainImageAlt?: string starCount: number isPublic: boolean } @@ -12,12 +13,13 @@ const RecipeCard = ({ title, ownerUsername, mainImageUrl, + mainImageAlt, starCount, isPublic }: RecipeCardProps) => { return (
- + {mainImageAlt}

{title}

diff --git a/src/pages/recipes/Recipes.tsx b/src/pages/recipes/Recipes.tsx index 2ac2326..0f776ba 100644 --- a/src/pages/recipes/Recipes.tsx +++ b/src/pages/recipes/Recipes.tsx @@ -35,6 +35,9 @@ const Recipes = () => { title={view.title} ownerUsername={view.ownerUsername} mainImageUrl={view.mainImage.url} + mainImageAlt={ + view.mainImage.alt ? view.mainImage.alt : undefined + } starCount={view.starCount} isPublic={view.isPublic} />