Skip to content

Commit

Permalink
chore: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ccatherinetan committed Nov 20, 2024
1 parent 17966a3 commit 970c7f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/view-plants/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default function Page() {
{ label: 'Winter', value: 'WINTER' },
];

// Fetch All Plants
useEffect(() => {
(async () => {
const plantList = await getAllPlants();
Expand All @@ -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);
Expand Down Expand Up @@ -123,6 +125,7 @@ export default function Page() {
selectedGrowingSeason,
searchTerm,
]);

function handleUserPlantCardClick(ownedPlant: OwnedPlant) {
router.push(`my-garden/${ownedPlant.userPlantId}`);
}
Expand Down

0 comments on commit 970c7f4

Please sign in to comment.