polish(mobile): cooking-avbryt, scan-review useEffect, stack-titlar, död kod (MIKRO 55)
CI / Typecheck, test & build (push) Failing after 42s

This commit is contained in:
Sven (AAMOS AI)
2026-08-14 18:45:36 +07:00
parent d95c67d979
commit 1f67e1532f
5 changed files with 5 additions and 10 deletions
-4
View File
@@ -193,7 +193,3 @@ function ExpiryTag({ expiry }: { expiry: InventoryItem["expiry"] }) {
}
return <View />;
}
function formatQty(quantity: number): string {
return Number.isInteger(quantity) ? String(quantity) : quantity.toFixed(1);
}
+2
View File
@@ -77,6 +77,8 @@ export default function RootLayout() {
/>
<Stack.Screen name="scan-review/[jobId]" options={{ title: t("scan.review.title") }} />
<Stack.Screen name="meal-review/[jobId]" options={{ title: t("scan.meal.title") }} />
<Stack.Screen name="reconciliation" options={{ title: t("reconciliation.title") }} />
<Stack.Screen name="scan-diff-review/[jobId]" options={{ title: t("scan.review.title") }} />
<Stack.Screen name="shopping" options={{ title: t("shopping.title") }} />
<Stack.Screen name="meal-boxes" options={{ title: t("mealbox.title") }} />
<Stack.Screen name="household" options={{ title: t("home.household") }} />
+1
View File
@@ -255,6 +255,7 @@ export default function CookingScreen() {
return (
<Screen scroll={false} style={{ justifyContent: "space-between" }}>
<View style={{ gap: spacing.md }}>
<Button label={t("common.cancel")} variant="ghost" onPress={() => router.dismissAll()} />
<Small>{recipe.titleSv}</Small>
<Heading>
{t("cooking.step", { current: stepIndex + 1, total: recipe.steps.length })}
-4
View File
@@ -232,7 +232,3 @@ export default function RecipeScreen() {
</Screen>
);
}
function formatQty(quantity: number): string {
return Number.isInteger(quantity) ? String(quantity) : String(Math.round(quantity * 100) / 100);
}
+2 -2
View File
@@ -1,4 +1,4 @@
import { useEffect, useMemo, useState } from "react";
import { useEffect, useState } from "react";
import { Alert, View } from "react-native";
import { router, useLocalSearchParams } from "expo-router";
import { useQuery, useQueryClient } from "@tanstack/react-query";
@@ -90,7 +90,7 @@ export default function ScanReviewScreen() {
const job = query.data;
// Initiera redigerbara rader när resultatet landar
useMemo(() => {
useEffect(() => {
if (job?.status === "awaiting_confirmation" && job.result?.items && items == null) {
setItems(
job.result.items.map((item, index) => ({