From f48d6e12c263a12703d70160fd31fea72212cfea Mon Sep 17 00:00:00 2001 From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com> Date: Sun, 20 Oct 2024 19:22:37 -0700 Subject: [PATCH 01/11] redeploy --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4ef0115..7787d0a 100644 --- a/README.md +++ b/README.md @@ -39,3 +39,5 @@ A highly performant replica of [McMaster-Carr](https://www.mcmaster.com/) using [PageSpeed report](https://pagespeed.web.dev/analysis/https-next-master-vercel-app/4181robe62?form_factor=mobile) ![image](https://github.com/user-attachments/assets/ccca9cb4-eedc-4415-b225-db9ee82ebf27) + + From c741501adeb507a5ba53c30272759a84dfbe47cc Mon Sep 17 00:00:00 2001 From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com> Date: Sun, 20 Oct 2024 19:36:06 -0700 Subject: [PATCH 02/11] db --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7787d0a..2fe7c43 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,4 @@ A highly performant replica of [McMaster-Carr](https://www.mcmaster.com/) using ![image](https://github.com/user-attachments/assets/ccca9cb4-eedc-4415-b225-db9ee82ebf27) + From 93f902a2fb59144d2d818442e7c84513ba281c0b Mon Sep 17 00:00:00 2001 From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com> Date: Sun, 20 Oct 2024 19:55:03 -0700 Subject: [PATCH 03/11] make the grid flex and left aligned --- README.md | 3 --- src/app/(category-sidebar)/page.tsx | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2fe7c43..4ef0115 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,3 @@ A highly performant replica of [McMaster-Carr](https://www.mcmaster.com/) using [PageSpeed report](https://pagespeed.web.dev/analysis/https-next-master-vercel-app/4181robe62?form_factor=mobile) ![image](https://github.com/user-attachments/assets/ccca9cb4-eedc-4415-b225-db9ee82ebf27) - - - diff --git a/src/app/(category-sidebar)/page.tsx b/src/app/(category-sidebar)/page.tsx index c9b97cd..9153a9a 100644 --- a/src/app/(category-sidebar)/page.tsx +++ b/src/app/(category-sidebar)/page.tsx @@ -19,17 +19,17 @@ export default async function Home() { return (
- Explore {productCount.at(0)?.count} products + Explore {productCount.at(0)?.count.toLocaleString()} products
{collections.map((collection) => (

{collection.name}

-
+
{collection.categories.map((category) => ( Date: Sun, 20 Oct 2024 20:24:32 -0700 Subject: [PATCH 04/11] sticky navbar & sidebar --- src/app/(category-sidebar)/layout.tsx | 17 +++-- src/app/layout.tsx | 94 +++++++++++++-------------- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/src/app/(category-sidebar)/layout.tsx b/src/app/(category-sidebar)/layout.tsx index 36bb83b..5dfa972 100644 --- a/src/app/(category-sidebar)/layout.tsx +++ b/src/app/(category-sidebar)/layout.tsx @@ -6,12 +6,15 @@ export default async function Layout({ }: { children: React.ReactNode; }) { - const allCategories = await db.query.categories.findMany({ - orderBy: (categories, { asc }) => asc(categories.name), + const allCategories = await db.query.collections.findMany({ + with: { + categories: true, + }, + orderBy: (collections, { asc }) => asc(collections.name), }); return ( -
-