Skip to content

Commit

Permalink
Check correctly if a fruit/vegetable is in season on FoodPage
Browse files Browse the repository at this point in the history
  • Loading branch information
aivuk committed Aug 30, 2023
1 parent 058432b commit 42ffce0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.fuzue.seasonfood;

import com.getcapacitor.BridgeActivity;

public class MainActivity extends BridgeActivity {}
2 changes: 1 addition & 1 deletion src/routes/FoodPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}
Expand Down

0 comments on commit 42ffce0

Please sign in to comment.