4
0
forked from crowetic/commerce

remove spread operator from <Link> component (#263)

* remove spread operator from <Link> component

* Remove props destructuring

Co-authored-by: Luis Alvarez <luis@vercel.com>
This commit is contained in:
Gandharv 2021-07-30 10:27:02 +05:30 committed by GitHub
parent 34d0a0b978
commit 44ce537b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ import Image, { ImageProps } from 'next/image'
import WishlistButton from '@components/wishlist/WishlistButton'
import usePrice from '@framework/product/use-price'
import ProductTag from '../ProductTag'
interface Props {
className?: string
product: Product
@ -23,7 +24,6 @@ const ProductCard: FC<Props> = ({
className,
noNameTag = false,
variant = 'default',
...props
}) => {
const { price } = usePrice({
amount: product.price.value,
@ -38,7 +38,7 @@ const ProductCard: FC<Props> = ({
)
return (
<Link href={`/product/${product.slug}`} {...props}>
<Link href={`/product/${product.slug}`}>
<a className={rootClassName}>
{variant === 'slim' && (
<>