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