import { FC, ReactNode, Component } from 'react' import cn from 'classnames' import Image from 'next/image' import Link from 'next/link' import type { ProductNode } from '@lib/bigcommerce/api/operations/get-all-products' import { Heart } from '@components/icon' import s from './ProductCard.module.css' interface Props { className?: string children?: ReactNode[] | Component[] | any[] product: ProductNode variant?: 'slim' | 'simple' imgWidth: number imgHeight: number priority?: boolean } const ProductCard: FC = ({ className, product: p, variant, imgWidth, imgHeight, priority, }) => { const src = p.images.edges?.[0]?.node.urlOriginal! if (variant === 'slim') { return (
{p.name}
) } return (

{p.name}

${p.prices?.price.value}
) } export default ProductCard