Merge branch 'master' into arzfran/improve-imgs

This commit is contained in:
Franco Arza
2020-10-26 21:15:52 -03:00
33 changed files with 84 additions and 238 deletions

View File

@@ -60,10 +60,10 @@ export default function Home({
// products, then fill them with products from the products list, this
// is useful for new commerce sites that don't have a lot of products
return {
featured: rangeMap(
6,
(i) => featuredProducts[i] ?? products.shift()
).filter(nonNullable),
featured: rangeMap(6, (i) => featuredProducts[i] ?? products.shift())
.filter(nonNullable)
.sort((a, b) => a.node.prices.price.value - b.node.prices.price.value)
.reverse(),
bestSelling: rangeMap(
6,
(i) => bestSellingProducts[i] ?? products.shift()
@@ -86,7 +86,7 @@ export default function Home({
))}
</Grid>
<Marquee variant="secondary">
{bestSelling.slice(0, 3).map(({ node }) => (
{bestSelling.slice(3, 6).map(({ node }) => (
<ProductCard
key={node.path}
product={node}
@@ -118,7 +118,7 @@ export default function Home({
))}
</Grid>
<Marquee>
{bestSelling.slice(3, 6).map(({ node }) => (
{bestSelling.slice(0, 3).map(({ node }) => (
<ProductCard
key={node.path}
product={node}