From fb397053c1be5453f89f41ee3ea0578eeecb016f Mon Sep 17 00:00:00 2001 From: Rory Aronson Date: Wed, 7 Jan 2026 05:18:04 -0800 Subject: [PATCH] hide spread spheres in promo --- frontend/promo/__tests__/plants_test.ts | 1 + frontend/promo/plants.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/frontend/promo/__tests__/plants_test.ts b/frontend/promo/__tests__/plants_test.ts index b179fd793..b01f542d9 100644 --- a/frontend/promo/__tests__/plants_test.ts +++ b/frontend/promo/__tests__/plants_test.ts @@ -18,6 +18,7 @@ describe("calculatePlantPositions()", () => { icon: CROPS.beet.icon, key: "beet", label: "Beet", + id: expect.any(Number), seed: expect.any(Number), size: 150, spread: 175, diff --git a/frontend/promo/plants.ts b/frontend/promo/plants.ts index 4035626c6..8c4c2e344 100644 --- a/frontend/promo/plants.ts +++ b/frontend/promo/plants.ts @@ -10,6 +10,7 @@ export const calculatePlantPositions = (config: Config): ThreeDGardenPlant[] => const startX = 350; let nextX = startX; let index = 0; + let nextId = 1; while (nextX <= config.bedLengthOuter - 100) { const plantKey = gardenPlants[index]; const plant = PLANTS[plantKey]; @@ -22,6 +23,7 @@ export const calculatePlantPositions = (config: Config): ThreeDGardenPlant[] => y: config.bedWidthOuter / 2, key: plantKey, seed: Math.random(), + id: nextId++, }); const plantsPerHalfRow = Math.ceil((config.bedWidthOuter - plant.spread) / 2 / plant.spread); @@ -33,6 +35,7 @@ export const calculatePlantPositions = (config: Config): ThreeDGardenPlant[] => y: config.bedWidthOuter / 2 + plant.spread * i, key: plantKey, seed: Math.random(), + id: nextId++, }); positions.push({ ...plant, @@ -41,6 +44,7 @@ export const calculatePlantPositions = (config: Config): ThreeDGardenPlant[] => y: config.bedWidthOuter / 2 - plant.spread * i, key: plantKey, seed: Math.random(), + id: nextId++, }); } if (index + 1 < gardenPlants.length) {