Latest Perf, Changes

This commit is contained in:
Belen Curcio
2020-11-06 16:30:08 -03:00
parent d74ffb1401
commit 2c40f61dc9
6 changed files with 37 additions and 40 deletions

View File

@@ -1,10 +1,9 @@
import { useMemo } from 'react'
import type { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
import rangeMap from '@lib/range-map'
import { Layout } from '@components/common'
import { Grid, Marquee, Hero } from '@components/ui'
import { ProductCard } from '@components/product'
import { Grid, Marquee, Hero } from '@components/ui'
import HomeAllProductsGrid from '@components/common/HomeAllProductsGrid'
import type { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
import { getConfig } from '@bigcommerce/storefront-data-hooks/api'
import getAllProducts from '@bigcommerce/storefront-data-hooks/api/operations/get-all-products'
@@ -90,10 +89,10 @@ export default function Home({
<ProductCard
key={node.path}
product={node}
// The first image is the largest one in the grid
imgWidth={i === 0 ? 1080 : 540}
imgHeight={i === 0 ? 1080 : 540}
priority
imgPriority
imgLoading="eager"
/>
))}
</Grid>
@@ -124,7 +123,6 @@ export default function Home({
<ProductCard
key={node.path}
product={node}
// The second image is the largest one in the grid
imgWidth={i === 1 ? 1080 : 540}
imgHeight={i === 1 ? 1080 : 540}
/>