From 312e03d94f1bd380c528e71cd74d207427fd8550 Mon Sep 17 00:00:00 2001 From: Sol Irvine Date: Mon, 13 Nov 2023 15:58:20 +0900 Subject: [PATCH] improvements for lighthouse scores --- app/[locale]/product/[handle]/page.tsx | 1 + app/[locale]/stories/[handle]/page.tsx | 1 + components/grid/homepage-products.tsx | 2 +- components/layout/menu/modal.tsx | 1 + components/layout/stories-detail.tsx | 1 + components/product/tasting-notes.tsx | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/[locale]/product/[handle]/page.tsx b/app/[locale]/product/[handle]/page.tsx index 3e22b9912..8b943cb79 100644 --- a/app/[locale]/product/[handle]/page.tsx +++ b/app/[locale]/product/[handle]/page.tsx @@ -117,6 +117,7 @@ export default async function ProductPage({ height={product.featuredImage.height} width={product.featuredImage.width} className="h-full w-full object-cover" + priority={true} /> diff --git a/app/[locale]/stories/[handle]/page.tsx b/app/[locale]/stories/[handle]/page.tsx index ed92e8ec4..87a08daba 100644 --- a/app/[locale]/stories/[handle]/page.tsx +++ b/app/[locale]/stories/[handle]/page.tsx @@ -80,6 +80,7 @@ export default async function BlogArticlePage({ height={article?.image.height} width={article?.image.width} className="h-full w-full object-cover" + priority={true} /> )} diff --git a/components/grid/homepage-products.tsx b/components/grid/homepage-products.tsx index 1e1d2e6c1..747ee4221 100644 --- a/components/grid/homepage-products.tsx +++ b/components/grid/homepage-products.tsx @@ -72,7 +72,7 @@ export async function HomepageProducts({ lang }: { lang?: SupportedLocale }) { > - + ); } diff --git a/components/layout/menu/modal.tsx b/components/layout/menu/modal.tsx index a13d60860..ec43660d4 100644 --- a/components/layout/menu/modal.tsx +++ b/components/layout/menu/modal.tsx @@ -26,6 +26,7 @@ export function MenuModal({ scrolled }: { scrolled: boolean }) { type="button" onClick={() => setIsOpen(true)} className="transition-all ease-in-out hover:scale-110" + aria-label="Open menu" > diff --git a/components/layout/stories-detail.tsx b/components/layout/stories-detail.tsx index 38b7d307e..18031191a 100644 --- a/components/layout/stories-detail.tsx +++ b/components/layout/stories-detail.tsx @@ -48,6 +48,7 @@ export default async function StoriesDetail({ 'h-full w-full object-cover', 'transition duration-300 ease-in-out hover:scale-105' )} + priority={true} /> )} diff --git a/components/product/tasting-notes.tsx b/components/product/tasting-notes.tsx index 9366acb99..a90dd5bab 100644 --- a/components/product/tasting-notes.tsx +++ b/components/product/tasting-notes.tsx @@ -27,6 +27,7 @@ export function ProductTastingNotes({ product }: { product: Product }) { width={imageWidth} height={imageHeight} alt={imageAlt || imageUrl} + priority={true} /> )}