mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Merge pull request #4 from ramyareye/woocommerce-framework
Woocommerce framework
This commit is contained in:
@@ -28,7 +28,7 @@ const HomeAllProductsGrid: FC<Props> = ({
|
|||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
{categories.map((cat: any) => (
|
{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)}>
|
<Link href={getCategoryPath(cat.path)}>
|
||||||
<a>{cat.name}</a>
|
<a>{cat.name}</a>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -42,7 +42,7 @@ const HomeAllProductsGrid: FC<Props> = ({
|
|||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
{brands.flatMap(({ node }: any) => (
|
{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)}>
|
<Link href={getDesignerPath(node.path)}>
|
||||||
<a>{node.name}</a>
|
<a>{node.name}</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
@@ -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>
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user