From 970c7f482eafd3f20da6cf72758e722d8665d161 Mon Sep 17 00:00:00 2001 From: Catherine Tan Date: Wed, 20 Nov 2024 02:11:36 -0800 Subject: [PATCH] chore: add comments --- app/view-plants/page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/view-plants/page.tsx b/app/view-plants/page.tsx index 3c657be..8f3adf3 100644 --- a/app/view-plants/page.tsx +++ b/app/view-plants/page.tsx @@ -60,6 +60,7 @@ export default function Page() { { label: 'Winter', value: 'WINTER' }, ]; + // Fetch All Plants useEffect(() => { (async () => { const plantList = await getAllPlants(); @@ -68,6 +69,7 @@ export default function Page() { })(); }, []); + // Fetch User Plants for My Garden tab useEffect(() => { const fetchUserPlants = async () => { const fetchedUserPlants = await getCurrentUserPlantsByUserId(user_id); @@ -123,6 +125,7 @@ export default function Page() { selectedGrowingSeason, searchTerm, ]); + function handleUserPlantCardClick(ownedPlant: OwnedPlant) { router.push(`my-garden/${ownedPlant.userPlantId}`); }