diff --git a/src/app/garden/containers/[id]/page.tsx b/src/app/garden/containers/[id]/page.tsx new file mode 100644 index 0000000..b7c3edc --- /dev/null +++ b/src/app/garden/containers/[id]/page.tsx @@ -0,0 +1,14 @@ +import { notFound } from "next/navigation"; +import { getContainer } from "@/modules/garden/server/queries"; +import { ContainerDetail } from "@/modules/garden/components/container-detail"; + +export default async function ContainerPage({ params }: { params: Promise<{ id: string }> }) { + const { id } = await params; + const container = await getContainer(id); + if (!container) notFound(); + return ( +
{container.type}
+ {container.locationNotes &&{container.locationNotes}
} +No plants in this container yet.
+ ) : ( +{p.name}
+ {p.scientificName && ( +{p.scientificName}
+ )} ++ No containers yet. Add one to start organising your plants. +
+ )} + ++ {c.plantCount} {c.plantCount === 1 ? "plant" : "plants"} +
+ + ))} +{d.type}
+ {d.locationNotes &&{d.locationNotes}
} + {d.plants.length > 0 && ( +Plants
+