mirror of
https://github.com/vercel/commerce.git
synced 2025-06-07 16:56:59 +00:00
Revert files
This commit is contained in:
parent
045f82bbe8
commit
036f0acb08
@ -35,7 +35,7 @@ const wishlistEndpoint: GetAPISchema<
|
||||
if (req.method === 'GET') {
|
||||
const body = getWishlistBodySchema.parse({
|
||||
customerToken,
|
||||
includeProducts: input.includeProducts ?? !!products,
|
||||
includeProducts: !!products,
|
||||
})
|
||||
output = await handlers['getWishlist']({ ...ctx, body })
|
||||
}
|
||||
|
@ -27,7 +27,9 @@ const WishlistButton: FC<Props> = ({
|
||||
const { openModal, setModalView } = useUI()
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
// @ts-ignore Wishlist is not always enabled
|
||||
const itemInWishlist = data?.items?.find(
|
||||
// @ts-ignore Wishlist is not always enabled
|
||||
(item) => item.productId === productId && item.variantId === variant.id
|
||||
)
|
||||
|
||||
|
@ -35,6 +35,7 @@ export async function getStaticProps({
|
||||
}
|
||||
|
||||
export default function Wishlist() {
|
||||
// @ts-ignore Shopify - Fix this types
|
||||
const { data, isLoading, isEmpty } = useWishlist({
|
||||
includeProducts: true,
|
||||
})
|
||||
|
@ -23,8 +23,8 @@
|
||||
"@components/*": ["components/*"],
|
||||
"@commerce": ["../packages/commerce/src"],
|
||||
"@commerce/*": ["../packages/commerce/src/*"],
|
||||
"@framework": ["../packages/shopify/src"],
|
||||
"@framework/*": ["../packages/shopify/src/*"]
|
||||
"@framework": ["../packages/local/src"],
|
||||
"@framework/*": ["../packages/local/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user