From 41b6ab5df9e83595b0d9e7deddea2c8390ba75d6 Mon Sep 17 00:00:00 2001 From: Chloe Date: Tue, 23 Apr 2024 15:53:00 +0700 Subject: [PATCH] feat: implement breadcrumb for PDP Signed-off-by: Chloe --- app/product/[handle]/page.tsx | 4 +- components/breadcrumb/breadcrumb-list.tsx | 96 +++++++++++++++++++++++ components/breadcrumb/index.tsx | 62 +++++++++++++++ lib/shopify/fragments/product.ts | 6 ++ lib/shopify/types.ts | 6 ++ 5 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 components/breadcrumb/breadcrumb-list.tsx create mode 100644 components/breadcrumb/index.tsx diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index ab75b6e7e..423a559f2 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -2,6 +2,7 @@ import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { Suspense } from 'react'; +import BreadcrumbComponent from 'components/breadcrumb'; import { GridTileImage } from 'components/grid/tile'; import Footer from 'components/layout/footer'; import { Gallery } from 'components/product/gallery'; @@ -82,7 +83,8 @@ export default async function ProductPage({ params }: { params: { handle: string }} />
-
+ +
& { + separator?: React.ReactNode; + } +>(({ ...props }, ref) =>