diff --git a/src/app/(category-sidebar)/[collection]/page.tsx b/src/app/(category-sidebar)/[collection]/page.tsx new file mode 100644 index 0000000..55fcf75 --- /dev/null +++ b/src/app/(category-sidebar)/[collection]/page.tsx @@ -0,0 +1,53 @@ +import { Link } from "@/components/ui/link"; +import { db } from "@/db"; +import { products } from "@/db/schema"; +import { count } from "drizzle-orm"; +import Image from "next/image"; + +export default async function Home(props: { + params: { + collection: string; + }; +}) { + const collections = await db.query.collections.findMany({ + with: { + categories: true, + }, + where: (collections, { eq }) => + eq(collections.name, decodeURIComponent(props.params.collection)), + orderBy: (collections, { asc }) => asc(collections.name), + }); + let imageCount = 0; + + return ( +