mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 12:11:22 +00:00
Change url to products/
This commit is contained in:
parent
0e7e7b7d5f
commit
b5455ae2fd
@ -84,7 +84,7 @@ const CartItem = ({
|
||||
>
|
||||
<div className="flex flex-row space-x-4 py-4">
|
||||
<div className="w-16 h-16 bg-violet relative overflow-hidden cursor-pointer z-0">
|
||||
<Link href={`/product/${item.path}`}>
|
||||
<Link href={`/products/${item.path}`}>
|
||||
<Image
|
||||
onClick={() => closeSidebarIfPresent()}
|
||||
className={s.productImage}
|
||||
@ -97,7 +97,7 @@ const CartItem = ({
|
||||
</Link>
|
||||
</div>
|
||||
<div className="flex-1 flex flex-col text-base">
|
||||
<Link href={`/product/${item.path}`}>
|
||||
<Link href={`/products/${item.path}`}>
|
||||
<span
|
||||
className={s.productName}
|
||||
onClick={() => closeSidebarIfPresent()}
|
||||
|
@ -38,7 +38,7 @@ const ProductCard: FC<Props> = ({
|
||||
)
|
||||
|
||||
return (
|
||||
<Link href={`/product/${product.slug}`}>
|
||||
<Link href={`/products/${product.slug}`}>
|
||||
<a className={rootClassName}>
|
||||
{variant === 'slim' && (
|
||||
<>
|
||||
|
@ -56,11 +56,11 @@ export async function getStaticPaths({ locales }: GetStaticPathsContext) {
|
||||
? locales.reduce<string[]>((arr, locale) => {
|
||||
// Add a product path for every locale
|
||||
products.forEach((product: any) => {
|
||||
arr.push(`/${locale}/product${product.path}`)
|
||||
arr.push(`/${locale}/products${product.path}`)
|
||||
})
|
||||
return arr
|
||||
}, [])
|
||||
: products.map((product: any) => `/product${product.path}`),
|
||||
: products.map((product: any) => `/products${product.path}`),
|
||||
fallback: 'blocking',
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user