Move /product to /products for IG compat

This commit is contained in:
Samantha Kellow 2023-08-20 20:25:59 +01:00
parent 7ef0ce169d
commit 483edf0a1b
7 changed files with 6 additions and 6 deletions

View File

@ -123,7 +123,7 @@ async function RelatedProducts({ id }: { id: string }) {
<Link
key={i}
className="w-full flex-none min-[475px]:w-1/2 sm:w-1/3 md:w-1/4 lg:w-1/5"
href={`/product/${product.handle}`}
href={`/products/${product.handle}`}
>
<GridTileImage
alt={product.title}

View File

@ -20,7 +20,7 @@ export default async function sitemap(): Promise<Promise<Promise<MetadataRoute.S
const productsPromise = getProducts({}).then((products) =>
products.map((product) => ({
url: `${baseUrl}/product/${product.handle}`,
url: `${baseUrl}/products/${product.handle}`,
lastModified: product.updatedAt
}))
);

View File

@ -14,7 +14,7 @@ export async function Carousel() {
{[...products, ...products].map((product, i) => (
<Link
key={`${product.handle}${i}`}
href={`/product/${product.handle}`}
href={`/products/${product.handle}`}
className="h-[30vh] w-2/3 flex-none md:w-1/3"
>
<GridTileImage

View File

@ -91,7 +91,7 @@ export default function CartModal({ cart }: { cart: Cart | undefined }) {
});
const merchandiseUrl = createUrl(
`/product/${item.merchandise.product.handle}`,
`/products/${item.merchandise.product.handle}`,
new URLSearchParams(merchandiseSearchParams)
);

View File

@ -8,7 +8,7 @@ function ThreeItemGridItem({ item, size }: { item: Product; size: 'full' | 'half
<div
className={size === 'full' ? 'lg:col-span-4 lg:row-span-2' : 'lg:col-span-2 lg:row-span-1'}
>
<Link className="block h-full" href={`/product/${item.handle}`}>
<Link className="block h-full" href={`/products/${item.handle}`}>
<GridTileImage
src={item.featuredImage.url}
width={size === 'full' ? 1080 : 540}

View File

@ -8,7 +8,7 @@ export default function ProductGridItems({ products }: { products: Product[] })
<>
{products.map((product) => (
<Grid.Item key={product.handle} className="animate-fadeIn">
<Link className="inline-block h-full w-full" href={`/product/${product.handle}`}>
<Link className="inline-block h-full w-full" href={`/products/${product.handle}`}>
<GridTileImage
alt={product.title}
label={{