Revert files

This commit is contained in:
Catalin Pinte 2022-12-14 15:00:13 +02:00
parent 045f82bbe8
commit 036f0acb08
4 changed files with 6 additions and 3 deletions

View File

@ -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 })
}

View File

@ -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
)

View File

@ -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,
})

View File

@ -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"],