diff --git a/packages/commerce/src/api/endpoints/wishlist.ts b/packages/commerce/src/api/endpoints/wishlist.ts index 3cefded5c..6eec02ced 100644 --- a/packages/commerce/src/api/endpoints/wishlist.ts +++ b/packages/commerce/src/api/endpoints/wishlist.ts @@ -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 }) } diff --git a/site/components/wishlist/WishlistButton/WishlistButton.tsx b/site/components/wishlist/WishlistButton/WishlistButton.tsx index e28477f80..72767f843 100644 --- a/site/components/wishlist/WishlistButton/WishlistButton.tsx +++ b/site/components/wishlist/WishlistButton/WishlistButton.tsx @@ -27,7 +27,9 @@ const WishlistButton: FC = ({ 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 ) diff --git a/site/pages/wishlist.tsx b/site/pages/wishlist.tsx index 2f39a0532..c8e2ec5f5 100644 --- a/site/pages/wishlist.tsx +++ b/site/pages/wishlist.tsx @@ -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, }) diff --git a/site/tsconfig.json b/site/tsconfig.json index 2de809a44..7c91afd6f 100644 --- a/site/tsconfig.json +++ b/site/tsconfig.json @@ -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"],