The recipes.blue monorepo recipes.blue
recipes appview atproto

fix: if recipe image url is set, show it

+17 -12
+9 -7
apps/web/src/components/recipe-card.tsx
··· 18 18 <Link to="/recipes/$author/$rkey" params={{ author: recipe.author.handle, rkey: recipe.rkey }} className="w-full"> 19 19 <Card className="overflow-hidden"> 20 20 <CardHeader className="p-0"> 21 - <div className="relative h-48 w-full"> 22 - <img 23 - src={"https://www.foodandwine.com/thmb/fjNakOY7IcuvZac1hR3JcSo7vzI=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/FAW-recipes-pasta-sausage-basil-and-mustard-hero-06-cfd1c0a2989e474ea7e574a38182bbee.jpg"} 24 - alt={recipe.title} 25 - className="h-full w-full object-cover" 26 - /> 27 - </div> 21 + { recipe.imageUrl && 22 + <div className="relative h-48 w-full"> 23 + <img 24 + src={recipe.imageUrl} 25 + alt={recipe.title} 26 + className="h-full w-full object-cover" 27 + /> 28 + </div> 29 + } 28 30 </CardHeader> 29 31 <CardContent className="p-4"> 30 32 <h3 className="text-lg font-semibold mb-2">{recipe.title}</h3>
+8 -5
apps/web/src/routes/_.(app)/recipes/$author/$rkey/index.lazy.tsx
··· 77 77 </CardHeader> 78 78 79 79 <CardContent className="space-y-6"> 80 - <img 81 - src={"https://www.foodandwine.com/thmb/fjNakOY7IcuvZac1hR3JcSo7vzI=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/FAW-recipes-pasta-sausage-basil-and-mustard-hero-06-cfd1c0a2989e474ea7e574a38182bbee.jpg"} 82 - alt={recipe.title} 83 - className="h-64 w-full object-cover rounded-md" 84 - /> 80 + { 81 + recipe.imageUrl && 82 + <img 83 + src={recipe.imageUrl} 84 + alt={recipe.title} 85 + className="h-64 w-full object-cover rounded-md" 86 + /> 87 + } 85 88 <div className="flex flex-wrap gap-4"> 86 89 <Badge variant="secondary" className="flex items-center gap-2"> 87 90 <Clock className="size-4" />