mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
Merge pull request #4 from ramyareye/woocommerce-framework
Woocommerce framework
This commit is contained in:
commit
756182af89
@ -28,7 +28,7 @@ const HomeAllProductsGrid: FC<Props> = ({
|
||||
</Link>
|
||||
</li>
|
||||
{categories.map((cat: any) => (
|
||||
<li key={cat.path} className="py-1 text-accent-8 text-base">
|
||||
<li key={cat.path} className="py-1 text-base text-accent-8">
|
||||
<Link href={getCategoryPath(cat.path)}>
|
||||
<a>{cat.name}</a>
|
||||
</Link>
|
||||
@ -42,7 +42,7 @@ const HomeAllProductsGrid: FC<Props> = ({
|
||||
</Link>
|
||||
</li>
|
||||
{brands.flatMap(({ node }: any) => (
|
||||
<li key={node.path} className="py-1 text-accent-8 text-base">
|
||||
<li key={node.path} className="py-1 text-base text-accent-8">
|
||||
<Link href={getDesignerPath(node.path)}>
|
||||
<a>{node.name}</a>
|
||||
</Link>
|
||||
|
@ -5,7 +5,7 @@ import type { Product } from '@commerce/types/product'
|
||||
import s from './ProductCard.module.css'
|
||||
import Image, { ImageProps } from 'next/image'
|
||||
import WishlistButton from '@components/wishlist/WishlistButton'
|
||||
// import usePrice from '@framework/product/use-price'
|
||||
import usePrice from '@framework/product/use-price'
|
||||
import ProductTag from '../ProductTag'
|
||||
|
||||
interface Props {
|
||||
@ -25,11 +25,11 @@ const ProductCard: FC<Props> = ({
|
||||
noNameTag = false,
|
||||
variant = 'default',
|
||||
}) => {
|
||||
// const { price } = usePrice({
|
||||
// amount: product.price.value,
|
||||
// baseAmount: product.price.retailPrice,
|
||||
// currencyCode: product.price.currencyCode!,
|
||||
// })
|
||||
const { price } = usePrice({
|
||||
amount: product.price.value,
|
||||
baseAmount: product.price.retailPrice,
|
||||
currencyCode: product.price.currencyCode!,
|
||||
})
|
||||
|
||||
const rootClassName = cn(
|
||||
s.root,
|
||||
@ -74,7 +74,7 @@ const ProductCard: FC<Props> = ({
|
||||
<span>{product.name}</span>
|
||||
</h3>
|
||||
<div className={s.price}>
|
||||
{/* {`${price} ${product.price?.currencyCode}`} */}
|
||||
{`${price} ${product.price?.currencyCode}`}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user