Skip to content

Commit

Permalink
remove auction
Browse files Browse the repository at this point in the history
  • Loading branch information
guitavano committed Feb 13, 2025
1 parent 6aff05c commit b0861a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
8 changes: 8 additions & 0 deletions linx/loaders/product/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ const loader = async (

const products = response?.Model?.Grid?.Products ?? [];

return products.map((product) => {
return toProduct(product, product.ProductSelection?.SkuID, {
cdn,
url,
currency: "BRL",
})
})

return await Promise.all(

Check failure on line 50 in linx/loaders/product/list.ts

View workflow job for this annotation

GitHub Actions / Bundle & Check Apps (ubuntu-latest)

This statement is unreachable
products.map(async (product) =>
await addAuctions(
Expand Down
19 changes: 7 additions & 12 deletions linx/loaders/product/listingPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,13 @@ const loader = async (
} = forProducts;
const { Model: { Grid: { Facets } } } = forProducts;

const products = await Promise.all(
Products.map(async (product) =>
await addAuctions(
toProduct(product, product.ProductSelection?.SkuID, {
cdn,
currency: "BRL",
url,
}),
ctx,
)
),
);
const products = Products.map((product) => {
return toProduct(product, product.ProductSelection?.SkuID, {
cdn,
currency: "BRL",
url,
})
})

return {
"@type": "ProductListingPage",
Expand Down

0 comments on commit b0861a3

Please sign in to comment.