mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Adding Features APO
This commit is contained in:
@@ -13,15 +13,16 @@ import usePrice from '@framework/product/use-price'
|
||||
import { useAddItem } from '@framework/cart'
|
||||
|
||||
import { getVariant, SelectedOptions } from '../helpers'
|
||||
// import WishlistButton from '@components/wishlist/WishlistButton'
|
||||
import WishlistButton from '@components/wishlist/WishlistButton'
|
||||
|
||||
interface Props {
|
||||
className?: string
|
||||
children?: any
|
||||
product: Product
|
||||
wishlist?: boolean
|
||||
}
|
||||
|
||||
const ProductView: FC<Props> = ({ product }) => {
|
||||
const ProductView: FC<Props> = ({ product, wishlist = false }) => {
|
||||
const addItem = useAddItem()
|
||||
const { price } = usePrice({
|
||||
amount: product.price.value,
|
||||
@@ -151,11 +152,13 @@ const ProductView: FC<Props> = ({ product }) => {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
{/* <WishlistButton
|
||||
className={s.wishlistButton}
|
||||
productId={product.id}
|
||||
variant={product.variants[0]!}
|
||||
/> */}
|
||||
{wishlist && (
|
||||
<WishlistButton
|
||||
className={s.wishlistButton}
|
||||
productId={product.id}
|
||||
variant={product.variants[0]!}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Container>
|
||||
)
|
||||
|
Reference in New Issue
Block a user