From 340728895070eb1eb561f043be3661fab89aad88 Mon Sep 17 00:00:00 2001 From: Timur Carpeev Date: Tue, 7 Nov 2023 10:50:05 +0100 Subject: [PATCH] Performance optimization (#1007) --- src/app/(main)/products/[slug]/page.tsx | 8 +++++++- src/ui/components/ProductElement.tsx | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/(main)/products/[slug]/page.tsx b/src/app/(main)/products/[slug]/page.tsx index f2c823356..566eefc16 100644 --- a/src/app/(main)/products/[slug]/page.tsx +++ b/src/app/(main)/products/[slug]/page.tsx @@ -126,7 +126,13 @@ export default async function Page(props: { params: { slug: string }; searchPara
{firstImage && ( - + )}
diff --git a/src/ui/components/ProductElement.tsx b/src/ui/components/ProductElement.tsx index 26cd663c5..a767a5238 100644 --- a/src/ui/components/ProductElement.tsx +++ b/src/ui/components/ProductElement.tsx @@ -20,6 +20,7 @@ export function ProductElement({ alt={product.thumbnail.alt ?? ""} width={512} height={512} + sizes={"512px"} priority={priority} /> )}