tangled
alpha
login
or
join now
roost.moe
/
recipes.blue
2
fork
atom
The recipes.blue monorepo
recipes.blue
recipes
appview
atproto
2
fork
atom
overview
issues
1
pulls
pipelines
fix: if recipe image url is set, show it
Hayden Young
1 year ago
132c9b04
33916c7d
+17
-12
2 changed files
expand all
collapse all
unified
split
apps
web
src
components
recipe-card.tsx
routes
_.(app)
recipes
$author
$rkey
index.lazy.tsx
+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
21
-
<div className="relative h-48 w-full">
22
22
-
<img
23
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
24
-
alt={recipe.title}
25
25
-
className="h-full w-full object-cover"
26
26
-
/>
27
27
-
</div>
21
21
+
{ recipe.imageUrl &&
22
22
+
<div className="relative h-48 w-full">
23
23
+
<img
24
24
+
src={recipe.imageUrl}
25
25
+
alt={recipe.title}
26
26
+
className="h-full w-full object-cover"
27
27
+
/>
28
28
+
</div>
29
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
80
-
<img
81
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
82
-
alt={recipe.title}
83
83
-
className="h-64 w-full object-cover rounded-md"
84
84
-
/>
80
80
+
{
81
81
+
recipe.imageUrl &&
82
82
+
<img
83
83
+
src={recipe.imageUrl}
84
84
+
alt={recipe.title}
85
85
+
className="h-64 w-full object-cover rounded-md"
86
86
+
/>
87
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" />