From 6dcc404dc12e79c9c85f49a4da3120da30e741b4 Mon Sep 17 00:00:00 2001 From: "Sven (AAMOS AI)" Date: Mon, 17 Aug 2026 21:41:59 +0700 Subject: [PATCH] =?UTF-8?q?feat(mobile):=20MIKRO=20MEAL-2=20tidsstyrd=20m?= =?UTF-8?q?=C3=A5ltid=20i=20Vad=20ska=20vi=20=C3=A4ta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mobile/src/app/(tabs)/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/mobile/src/app/(tabs)/index.tsx b/apps/mobile/src/app/(tabs)/index.tsx index f4ac089..9f6446f 100644 --- a/apps/mobile/src/app/(tabs)/index.tsx +++ b/apps/mobile/src/app/(tabs)/index.tsx @@ -56,11 +56,14 @@ export default function WhatToEatScreen() { const [page, setPage] = useState(0); const { track } = useAnalytics(); + const hour = new Date().getHours(); + const currentMeal = hour < 10 ? "breakfast" : hour < 14 ? "lunch" : "dinner"; + const query = useQuery({ - queryKey: ["what-to-eat", submittedCraving], + queryKey: ["what-to-eat", submittedCraving, currentMeal], queryFn: () => api( - `/v1/recommendations/what-to-eat?limit=15&view=pantry${submittedCraving ? `&craving=${encodeURIComponent(submittedCraving)}` : ""}`, + `/v1/recommendations/what-to-eat?limit=15&view=pantry&mealType=${currentMeal}${submittedCraving ? `&craving=${encodeURIComponent(submittedCraving)}` : ""}`, ), });