From 9390cc0e669189cb6ad0a83cc62052afb48fef9d Mon Sep 17 00:00:00 2001 From: "Sven (AAMOS AI)" Date: Fri, 14 Aug 2026 18:56:42 +0700 Subject: [PATCH] =?UTF-8?q?fix(mobile):=20receptdetalj=20p=C3=A5=20anv?= =?UTF-8?q?=C3=A4ndarens=20spr=C3=A5k=20(MIKRO=2056)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mobile/src/app/recipe/[id].tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/mobile/src/app/recipe/[id].tsx b/apps/mobile/src/app/recipe/[id].tsx index e16510e..29941b7 100644 --- a/apps/mobile/src/app/recipe/[id].tsx +++ b/apps/mobile/src/app/recipe/[id].tsx @@ -27,7 +27,9 @@ import { formatQuantity } from "@/lib/units"; interface RecipeDetail { id: string; titleSv: string; + title?: string; descriptionSv: string; + description?: string; portions: number; totalTimeMinutes: number; spiceLevel: number; @@ -38,6 +40,7 @@ interface RecipeDetail { ingredients: Array<{ id: string; displayNameSv: string; + displayName?: string; quantity: number; unit: string; optional: boolean; @@ -48,6 +51,7 @@ interface RecipeDetail { id: string; stepNumber: number; instructionSv: string; + instruction?: string; temperatureC: number | null; }>; safety: { safe: boolean; violations: Array<{ severity: string; messageSv: string }> }; @@ -106,7 +110,7 @@ export default function RecipeScreen() { return ( - {recipe.titleSv} + {recipe.title ?? recipe.titleSv} @@ -126,7 +130,7 @@ export default function RecipeScreen() { )} {recipe.verificationStatus === "editorial" && } - {recipe.descriptionSv} + {recipe.description ?? recipe.descriptionSv} {recipe.creatorDisplayName && Skapat av {recipe.creatorDisplayName}} {!recipe.safety.safe && ( @@ -171,9 +175,9 @@ export default function RecipeScreen() { {ingredients.map((ing) => ( - + - {ing.displayNameSv} + {ing.displayName ?? ing.displayNameSv} {ing.optional ? " (valfritt)" : ""} {formatQuantity(ing.quantity, ing.unit)} @@ -186,7 +190,7 @@ export default function RecipeScreen() { {recipe.steps.map((step) => ( - {step.stepNumber}. {step.instructionSv} + {step.stepNumber}. {step.instruction ?? step.instructionSv} {step.temperatureC ? ` (${step.temperatureC} °C)` : ""}