polish(mobile): cooking-avbryt, scan-review useEffect, stack-titlar, död kod (MIKRO 55)
CI / Typecheck, test & build (push) Failing after 42s
CI / Typecheck, test & build (push) Failing after 42s
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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") }} />
|
||||
|
||||
@@ -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 })}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user