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') {
|
if (req.method === 'GET') {
|
||||||
const body = getWishlistBodySchema.parse({
|
const body = getWishlistBodySchema.parse({
|
||||||
customerToken,
|
customerToken,
|
||||||
includeProducts: input.includeProducts ?? !!products,
|
includeProducts: !!products,
|
||||||
})
|
})
|
||||||
output = await handlers['getWishlist']({ ...ctx, body })
|
output = await handlers['getWishlist']({ ...ctx, body })
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,9 @@ const WishlistButton: FC<Props> = ({
|
|||||||
const { openModal, setModalView } = useUI()
|
const { openModal, setModalView } = useUI()
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
|
|
||||||
|
// @ts-ignore Wishlist is not always enabled
|
||||||
const itemInWishlist = data?.items?.find(
|
const itemInWishlist = data?.items?.find(
|
||||||
|
// @ts-ignore Wishlist is not always enabled
|
||||||
(item) => item.productId === productId && item.variantId === variant.id
|
(item) => item.productId === productId && item.variantId === variant.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ export async function getStaticProps({
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Wishlist() {
|
export default function Wishlist() {
|
||||||
|
// @ts-ignore Shopify - Fix this types
|
||||||
const { data, isLoading, isEmpty } = useWishlist({
|
const { data, isLoading, isEmpty } = useWishlist({
|
||||||
includeProducts: true,
|
includeProducts: true,
|
||||||
})
|
})
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
"@components/*": ["components/*"],
|
"@components/*": ["components/*"],
|
||||||
"@commerce": ["../packages/commerce/src"],
|
"@commerce": ["../packages/commerce/src"],
|
||||||
"@commerce/*": ["../packages/commerce/src/*"],
|
"@commerce/*": ["../packages/commerce/src/*"],
|
||||||
"@framework": ["../packages/shopify/src"],
|
"@framework": ["../packages/local/src"],
|
||||||
"@framework/*": ["../packages/shopify/src/*"]
|
"@framework/*": ["../packages/local/src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user