import Link from 'next/link' import React from 'react' import { IconBuy } from 'src/components/icons' import { ROUTE } from 'src/utils/constanst.utils' import { ProductProps } from 'src/utils/types.utils' import { ImgWithLink } from '..' import ButtonCommon from '../ButtonCommon/ButtonCommon' import ButtonIconBuy from '../ButtonIconBuy/ButtonIconBuy' import ItemWishList from '../ItemWishList/ItemWishList' import LabelCommon from '../LabelCommon/LabelCommon' import s from './ProductCard.module.scss' import ProductNotSell from './ProductNotSell/ProductNotSell' export interface ProductCardProps extends ProductProps { buttonText?: string isSingleButton?: boolean, } const ProductCard = ({ category, name, weight, price, buttonText = 'Buy Now', imageSrc, isNotSell, isSingleButton, }: ProductCardProps) => { if (isNotSell) { return
} return (
{category}
{name}
{weight}
{price}
{ isSingleButton ?
}>Add to cart
: <>
{buttonText}
}
) } export default ProductCard