forked from crowetic/commerce
use an anchor for the link to product
This commit is contained in:
parent
ee1051c2ca
commit
7b012564b0
@ -19,8 +19,6 @@ interface ProductData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ProductCard: FC<Props> = ({ className, node: p, variant }) => {
|
const ProductCard: FC<Props> = ({ className, node: p, variant }) => {
|
||||||
const rootClassName = cn(s.root, className)
|
|
||||||
|
|
||||||
if (variant === 'slim') {
|
if (variant === 'slim') {
|
||||||
return (
|
return (
|
||||||
<div className="relative overflow-hidden box-border">
|
<div className="relative overflow-hidden box-border">
|
||||||
@ -39,7 +37,7 @@ const ProductCard: FC<Props> = ({ className, node: p, variant }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={`product${p.path}`}>
|
<Link href={`product${p.path}`}>
|
||||||
<div className={rootClassName}>
|
<a className={cn(s.root, className)}>
|
||||||
<div className="absolute z-10 inset-0 flex items-center justify-center">
|
<div className="absolute z-10 inset-0 flex items-center justify-center">
|
||||||
<img
|
<img
|
||||||
className="w-full object-cover"
|
className="w-full object-cover"
|
||||||
@ -60,7 +58,7 @@ const ProductCard: FC<Props> = ({ className, node: p, variant }) => {
|
|||||||
<Heart />
|
<Heart />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user