mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
improvements for lighthouse scores
This commit is contained in:
parent
0d2fef5f42
commit
312e03d94f
@ -117,6 +117,7 @@ export default async function ProductPage({
|
|||||||
height={product.featuredImage.height}
|
height={product.featuredImage.height}
|
||||||
width={product.featuredImage.width}
|
width={product.featuredImage.width}
|
||||||
className="h-full w-full object-cover"
|
className="h-full w-full object-cover"
|
||||||
|
priority={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ export default async function BlogArticlePage({
|
|||||||
height={article?.image.height}
|
height={article?.image.height}
|
||||||
width={article?.image.width}
|
width={article?.image.width}
|
||||||
className="h-full w-full object-cover"
|
className="h-full w-full object-cover"
|
||||||
|
priority={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -72,7 +72,7 @@ export async function HomepageProducts({ lang }: { lang?: SupportedLocale }) {
|
|||||||
>
|
>
|
||||||
<HomepageProductsItem item={firstProduct} priority={true} />
|
<HomepageProductsItem item={firstProduct} priority={true} />
|
||||||
<HomepageProductsItem item={secondProduct} priority={true} />
|
<HomepageProductsItem item={secondProduct} priority={true} />
|
||||||
<HomepageProductsItem item={thirdProduct} />
|
<HomepageProductsItem item={thirdProduct} priority={true} />
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ export function MenuModal({ scrolled }: { scrolled: boolean }) {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
className="transition-all ease-in-out hover:scale-110"
|
className="transition-all ease-in-out hover:scale-110"
|
||||||
|
aria-label="Open menu"
|
||||||
>
|
>
|
||||||
<MenuIcon />
|
<MenuIcon />
|
||||||
</button>
|
</button>
|
||||||
|
@ -48,6 +48,7 @@ export default async function StoriesDetail({
|
|||||||
'h-full w-full object-cover',
|
'h-full w-full object-cover',
|
||||||
'transition duration-300 ease-in-out hover:scale-105'
|
'transition duration-300 ease-in-out hover:scale-105'
|
||||||
)}
|
)}
|
||||||
|
priority={true}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,6 +27,7 @@ export function ProductTastingNotes({ product }: { product: Product }) {
|
|||||||
width={imageWidth}
|
width={imageWidth}
|
||||||
height={imageHeight}
|
height={imageHeight}
|
||||||
alt={imageAlt || imageUrl}
|
alt={imageAlt || imageUrl}
|
||||||
|
priority={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user