From 8e9ab3d1132635ec07eac643a0c9572d78302cf6 Mon Sep 17 00:00:00 2001 From: Nils-Johan Gynther Date: Fri, 10 Apr 2026 19:20:51 +0200 Subject: [PATCH] Add recipe instructions display and missing ingredients alert in RecipePreview component --- frontend/app/recipes/RecipePreview.tsx | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/frontend/app/recipes/RecipePreview.tsx b/frontend/app/recipes/RecipePreview.tsx index fa8a3849..d8a1b234 100644 --- a/frontend/app/recipes/RecipePreview.tsx +++ b/frontend/app/recipes/RecipePreview.tsx @@ -217,6 +217,54 @@ export default function RecipePreview({ recipes }: Props) { + {(() => { + const selected = recipes.find((r) => String(r.id) === selectedRecipeId); + if (!selected?.instructions) return null; + return ( +
+

Instruktioner – {selected.name}

+

+ {selected.instructions} +

+
+ ); + })()} + + {preview && preview.summary.missingCount > 0 && ( +
+

+ Saknade ingredienser ({preview.summary.missingCount}) +

+ +
+ )} + {preview ? (