Crop type affects the output

This commit is contained in:
LABS\s478989 2024-01-16 16:02:04 +01:00
parent d8ac8c32a5
commit 3dc1bcf466
1 changed files with 14 additions and 1 deletions

View File

@ -90,7 +90,20 @@
draw_image_and_boxes(file, boxes);
const location = locationInput.value;
getWeather(location);
if (cropTypeInput.value == "external") {
getWeather(location);
}
else {
const randomTips = [
"water your tomatoes every day.",
"keep the temperature between 20-25 degrees Celsius.",
"place the tomatoes in sunlight."];
const randomTip = randomTips[Math.floor(Math.random() * randomTips.length)];
document.getElementById("weatherInfo").innerText = "TIP! To maximalize your yields " + randomTip;
}
});
function draw_image_and_boxes(file, boxes) {