improvements for lighthouse scores

This commit is contained in:
Sol Irvine 2023-11-13 15:58:20 +09:00
parent 0d2fef5f42
commit 312e03d94f
6 changed files with 6 additions and 1 deletions

View File

@ -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}
/>
</div>

View File

@ -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}
/>
</div>
)}

View File

@ -72,7 +72,7 @@ export async function HomepageProducts({ lang }: { lang?: SupportedLocale }) {
>
<HomepageProductsItem item={firstProduct} priority={true} />
<HomepageProductsItem item={secondProduct} priority={true} />
<HomepageProductsItem item={thirdProduct} />
<HomepageProductsItem item={thirdProduct} priority={true} />
</section>
);
}

View File

@ -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"
>
<MenuIcon />
</button>

View File

@ -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}
/>
)}
</div>

View File

@ -27,6 +27,7 @@ export function ProductTastingNotes({ product }: { product: Product }) {
width={imageWidth}
height={imageHeight}
alt={imageAlt || imageUrl}
priority={true}
/>
</div>
)}