Merge pull request #21 from zenzen-sol/sol/image-boost

chore: Image boost & lighthouse improvements
This commit is contained in:
Sol Irvine 2023-11-13 16:01:55 +09:00 committed by GitHub
commit 2f7a2aaddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 1 deletions

View File

@ -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>

View File

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

View File

@ -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>
); );
} }

View File

@ -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>

View File

@ -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>

View File

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