From c473bc82249fa66ea25aafc19682be80db916d44 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 19 May 2023 12:18:26 +0100 Subject: [PATCH] update /product URL to /products to support meta commerce integrations and shopify SEO --- app/{product => products}/[handle]/page.tsx | 0 app/sitemap.ts | 2 +- components/carousel.tsx | 2 +- components/cart/modal.tsx | 2 +- components/grid/three-items.tsx | 2 +- components/layout/product-grid-items.tsx | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename app/{product => products}/[handle]/page.tsx (100%) diff --git a/app/product/[handle]/page.tsx b/app/products/[handle]/page.tsx similarity index 100% rename from app/product/[handle]/page.tsx rename to app/products/[handle]/page.tsx diff --git a/app/sitemap.ts b/app/sitemap.ts index d8cdfd2ea..c71d02efa 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -20,7 +20,7 @@ export default async function sitemap(): Promise products.map((product) => ({ - url: `${baseUrl}/product/${product.handle}`, + url: `${baseUrl}/products/${product.handle}`, lastModified: product.updatedAt })) ); diff --git a/components/carousel.tsx b/components/carousel.tsx index d86d17f45..926ffe826 100644 --- a/components/carousel.tsx +++ b/components/carousel.tsx @@ -14,7 +14,7 @@ export async function Carousel() { {[...products, ...products].map((product, i) => ( {product.featuredImage ? ( diff --git a/components/cart/modal.tsx b/components/cart/modal.tsx index 4220cfe94..ce94f8d57 100644 --- a/components/cart/modal.tsx +++ b/components/cart/modal.tsx @@ -89,7 +89,7 @@ export default function CartModal({ }); const merchandiseUrl = createUrl( - `/product/${item.merchandise.product.handle}`, + `/products/${item.merchandise.product.handle}`, new URLSearchParams(merchandiseSearchParams) ); diff --git a/components/grid/three-items.tsx b/components/grid/three-items.tsx index 2280de26e..92e83ff4f 100644 --- a/components/grid/three-items.tsx +++ b/components/grid/three-items.tsx @@ -16,7 +16,7 @@ function ThreeItemGridItem({
- + {products.map((product) => ( - +