import Link from "next/link"; import { listContainers, listPlants } from "@/modules/garden/server/queries"; import { ContainerList } from "@/modules/garden/components/container-list"; import { PlantList } from "@/modules/garden/components/plant-list"; import { PushOverdueButton } from "@/modules/garden/components/push-overdue-button"; type Props = { searchParams: Promise<{ tab?: string }>; }; export default async function GardenPage({ searchParams }: Props) { const { tab = "containers" } = await searchParams; const isPlants = tab === "plants"; const [containers, plants] = await Promise.all([ listContainers(), isPlants ? listPlants() : Promise.resolve([]), ]); return (

Garden

Containers Plants
{isPlants ? : }
); }