Skip to content

Commit

Permalink
Performance optimization (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
timuric authored Nov 7, 2023
1 parent 3ef2c41 commit 3407288
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/(main)/products/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,13 @@ export default async function Page(props: { params: { slug: string }; searchPara
<section className="mx-auto grid max-w-7xl p-8">
<form className="grid gap-2 sm:grid-cols-2" action={addItem}>
{firstImage && (
<ProductImageWrapper alt={firstImage.alt ?? ""} width={1024} height={1024} src={firstImage.url} />
<ProductImageWrapper
priority={true}
alt={firstImage.alt ?? ""}
width={1024}
height={1024}
src={firstImage.url}
/>
)}
<div className="flex flex-col pt-6 sm:px-6 sm:pt-0">
<div>
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/ProductElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function ProductElement({
alt={product.thumbnail.alt ?? ""}
width={512}
height={512}
sizes={"512px"}
priority={priority}
/>
)}
Expand Down

0 comments on commit 3407288

Please sign in to comment.