From 42ffce03c6c76ed4d512fe054472890d49fa563d Mon Sep 17 00:00:00 2001 From: Edgar Zanella Alvarenga Date: Wed, 30 Aug 2023 13:19:59 +0200 Subject: [PATCH] Check correctly if a fruit/vegetable is in season on FoodPage --- .../app/src/main/java/org/fuzue/seasonfood/MainActivity.java | 5 +++++ src/routes/FoodPage.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 android/app/src/main/java/org/fuzue/seasonfood/MainActivity.java diff --git a/android/app/src/main/java/org/fuzue/seasonfood/MainActivity.java b/android/app/src/main/java/org/fuzue/seasonfood/MainActivity.java new file mode 100644 index 0000000..0660a9d --- /dev/null +++ b/android/app/src/main/java/org/fuzue/seasonfood/MainActivity.java @@ -0,0 +1,5 @@ +package org.fuzue.seasonfood; + +import com.getcapacitor.BridgeActivity; + +public class MainActivity extends BridgeActivity {} diff --git a/src/routes/FoodPage.tsx b/src/routes/FoodPage.tsx index a0d53a4..5eb89cd 100644 --- a/src/routes/FoodPage.tsx +++ b/src/routes/FoodPage.tsx @@ -31,7 +31,7 @@ export default function FoodPage() { if (selectedFood && selectedFood.season[i] === true) { seasonMonths.push(months[i]); seasonStatus = "FoodPage_notInSeasonText"; - if (seasonMonths.includes(months[currentMonth])) { + if (seasonMonths.includes(months[currentMonth - 1])) { seasonStatus = "FoodPage_inSeasonText"; } }