fix: bring back product price

This commit is contained in:
Reza Babaei
2021-09-18 22:25:38 +03:00
parent 07b3c50e35
commit d2e8b54954
2 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ import type { Product } from '@commerce/types/product'
import s from './ProductCard.module.css' import s from './ProductCard.module.css'
import Image, { ImageProps } from 'next/image' import Image, { ImageProps } from 'next/image'
import WishlistButton from '@components/wishlist/WishlistButton' import WishlistButton from '@components/wishlist/WishlistButton'
// import usePrice from '@framework/product/use-price' import usePrice from '@framework/product/use-price'
import ProductTag from '../ProductTag' import ProductTag from '../ProductTag'
interface Props { interface Props {
@@ -25,11 +25,11 @@ const ProductCard: FC<Props> = ({
noNameTag = false, noNameTag = false,
variant = 'default', variant = 'default',
}) => { }) => {
// const { price } = usePrice({ const { price } = usePrice({
// amount: product.price.value, amount: product.price.value,
// baseAmount: product.price.retailPrice, baseAmount: product.price.retailPrice,
// currencyCode: product.price.currencyCode!, currencyCode: product.price.currencyCode!,
// }) })
const rootClassName = cn( const rootClassName = cn(
s.root, s.root,
@@ -74,7 +74,7 @@ const ProductCard: FC<Props> = ({
<span>{product.name}</span> <span>{product.name}</span>
</h3> </h3>
<div className={s.price}> <div className={s.price}>
{/* {`${price} ${product.price?.currencyCode}`} */} {`${price} ${product.price?.currencyCode}`}
</div> </div>
</div> </div>
)} )}