Change url to products/

This commit is contained in:
Daniel Gent 2021-08-23 19:07:19 +02:00
parent 0e7e7b7d5f
commit b5455ae2fd
3 changed files with 5 additions and 5 deletions

View File

@ -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()}

View File

@ -38,7 +38,7 @@ const ProductCard: FC<Props> = ({
)
return (
<Link href={`/product/${product.slug}`}>
<Link href={`/products/${product.slug}`}>
<a className={rootClassName}>
{variant === 'slim' && (
<>

View File

@ -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',
}
}