mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Update types (#831)
* Update product types * Cart types progress, add zod & initial schema validator * Update normalize.ts * Update with-schema-parser.ts * Updated types, schemas & providers * Fix providers after schema parse errors * Fix paths * More provider fixes * Fix kibocommerce & commercejs * Add customer updated types & fixes * Add checkout & customer types * Import core types only from commerce * Update tsconfig.json * Convert hooks interfaces to types * Requested changes * Change to relative paths * Move Zod dependency
This commit is contained in:
@@ -30,9 +30,7 @@ const WishlistButton: FC<Props> = ({
|
||||
// @ts-ignore Wishlist is not always enabled
|
||||
const itemInWishlist = data?.items?.find(
|
||||
// @ts-ignore Wishlist is not always enabled
|
||||
(item) =>
|
||||
item.product_id === Number(productId) &&
|
||||
item.variant_id === Number(variant.id)
|
||||
(item) => item.product_id === productId && item.variant_id === variant.id
|
||||
)
|
||||
|
||||
const handleWishlistChange = async (e: any) => {
|
||||
|
@@ -11,12 +11,12 @@ import type { Product } from '@commerce/types/product'
|
||||
import usePrice from '@framework/product/use-price'
|
||||
import useAddItem from '@framework/cart/use-add-item'
|
||||
import useRemoveItem from '@framework/wishlist/use-remove-item'
|
||||
import type { Wishlist } from '@commerce/types/wishlist'
|
||||
import type { WishlistItem } from '@commerce/types/wishlist'
|
||||
|
||||
const placeholderImg = '/product-img-placeholder.svg'
|
||||
|
||||
const WishlistCard: React.FC<{
|
||||
item: Wishlist
|
||||
item: WishlistItem
|
||||
}> = ({ item }) => {
|
||||
const product: Product = item.product
|
||||
const { price } = usePrice({
|
||||
|
Reference in New Issue
Block a user