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 <Link
key={i} key={i}
className="w-full flex-none min-[475px]:w-1/2 sm:w-1/3 md:w-1/4 lg:w-1/5" 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 <GridTileImage
alt={product.title} alt={product.title}

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ function ThreeItemGridItem({ item, size }: { item: Product; size: 'full' | 'half
<div <div
className={size === 'full' ? 'lg:col-span-4 lg:row-span-2' : 'lg:col-span-2 lg:row-span-1'} 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 <GridTileImage
src={item.featuredImage.url} src={item.featuredImage.url}
width={size === 'full' ? 1080 : 540} width={size === 'full' ? 1080 : 540}

View File

@ -8,7 +8,7 @@ export default function ProductGridItems({ products }: { products: Product[] })
<> <>
{products.map((product) => ( {products.map((product) => (
<Grid.Item key={product.handle} className="animate-fadeIn"> <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 <GridTileImage
alt={product.title} alt={product.title}
label={{ label={{