Revert "Revert "Merge branch 'agnostic' of https://github.com/vercel/commerce into agnostic""
This reverts commit c9a43f1bce.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { FC } from 'react'
|
||||
import Link from 'next/link'
|
||||
import cn from 'classnames'
|
||||
import type { LineItem } from '@framework/types'
|
||||
import useCart from '@framework/cart/use-cart'
|
||||
import useCustomer from '@framework/customer/use-customer'
|
||||
import { Heart, Bag } from '@components/icons'
|
||||
@@ -15,7 +16,7 @@ interface Props {
|
||||
|
||||
const countItem = (count: number, item: LineItem) => count + item.quantity
|
||||
|
||||
const UserNav: FC<Props> = ({ className, children }) => {
|
||||
const UserNav: FC<Props> = ({ className }) => {
|
||||
const { data } = useCart()
|
||||
const { data: customer } = useCustomer()
|
||||
const { toggleSidebar, closeSidebarIfPresent, openModal } = useUI()
|
||||
|
||||
@@ -42,8 +42,8 @@ const WishlistCard: FC<Props> = ({ product }) => {
|
||||
setLoading(true)
|
||||
try {
|
||||
await addItem({
|
||||
productId: Number(product.id),
|
||||
variantId: Number(product.variants[0].id),
|
||||
productId: product.id,
|
||||
variantId: product.variants[0].id,
|
||||
})
|
||||
openSidebar()
|
||||
setLoading(false)
|
||||
|
||||
Reference in New Issue
Block a user