diff --git a/components/product/ProductCard.tsx b/components/product/ProductCard.tsx index d52be56..c6e65d1 100644 --- a/components/product/ProductCard.tsx +++ b/components/product/ProductCard.tsx @@ -6,8 +6,6 @@ import type { Product } from "apps/commerce/types.ts"; import { mapProductToAnalyticsItem } from "apps/commerce/utils/productToAnalyticsItem.ts"; import Image from "apps/website/components/Image.tsx"; import { relative } from "$store/sdk/url.ts"; -import { useDevice } from "deco/hooks/useDevice.ts"; -import AddToCartButtonVTEX from "deco-sites/maconequiio/islands/AddToCartButton/vtex.tsx"; export interface Layout { onMouseOver?: { @@ -57,24 +55,13 @@ function ProductCard({ const id = `product-card-${productID}`; const description = product.description || isVariantOf?.description; const [front] = images ?? []; - const { listPrice, price, installments, availability, seller = "1" } = - useOffer(offers); + const { listPrice, price, installments, availability } = useOffer(offers); const name = product?.isVariantOf?.name || partialName; const l = layout; - const device = useDevice(); - const isDesktop = device === "desktop"; - const isUnavailable = availability === "https://schema.org/OutOfStock"; - const eventItem = mapProductToAnalyticsItem({ - product, - price, - listPrice, - index, - }); - const discount = Math.round( (((listPrice ?? 0) - (price ?? 0)) / (listPrice ?? 0)) * 100, ); @@ -200,23 +187,12 @@ function ProductCard({ )} - {!l?.hide?.cta && isDesktop - ? ( -