From 9c813577e1deaf69166ef96fc72e24c4bd98ca04 Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Wed, 2 Aug 2023 21:07:35 -0500 Subject: [PATCH 1/2] Optimizes image sizes (#1140) --- app/product/[handle]/page.tsx | 31 ++++++++-------- components/carousel.tsx | 35 +++++++++--------- components/cart/modal.tsx | 4 +- components/grid/three-items.tsx | 12 +++--- components/layout/product-grid-items.tsx | 6 +-- components/product/gallery.tsx | 47 ++++++++++++------------ 6 files changed, 69 insertions(+), 66 deletions(-) diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index 815078b56..d59423364 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -82,8 +82,8 @@ export default async function ProductPage({ params }: { params: { handle: string }} />
-
-
+
+
({ src: image.url, @@ -92,7 +92,7 @@ export default async function ProductPage({ params }: { params: { handle: string />
-
+
@@ -115,14 +115,13 @@ async function RelatedProducts({ id }: { id: string }) { return (

Related Products

-
- {relatedProducts.map((product, i) => { - return ( - +
    + {relatedProducts.map((product) => ( +
  • + - ); - })} -
+ + ))} +
); } diff --git a/components/carousel.tsx b/components/carousel.tsx index d67ba5deb..a4c58bd5d 100644 --- a/components/carousel.tsx +++ b/components/carousel.tsx @@ -10,27 +10,28 @@ export async function Carousel() { return (
-
+
    {[...products, ...products].map((product, i) => ( - - - + + + + ))} -
+
); } diff --git a/components/cart/modal.tsx b/components/cart/modal.tsx index a6b45b9ae..4fbfcc6ad 100644 --- a/components/cart/modal.tsx +++ b/components/cart/modal.tsx @@ -111,7 +111,7 @@ export default function CartModal({ cart }: { cart: Cart | undefined }) { >
{
-

+

{item.quantity}

diff --git a/components/grid/three-items.tsx b/components/grid/three-items.tsx index 4a680fc36..abb379e5c 100644 --- a/components/grid/three-items.tsx +++ b/components/grid/three-items.tsx @@ -6,13 +6,15 @@ import Link from 'next/link'; function ThreeItemGridItem({ item, size }: { item: Product; size: 'full' | 'half' }) { return (
- + +
diff --git a/components/layout/product-grid-items.tsx b/components/layout/product-grid-items.tsx index d9060adbb..ea8a5ebf7 100644 --- a/components/layout/product-grid-items.tsx +++ b/components/layout/product-grid-items.tsx @@ -8,7 +8,7 @@ export default function ProductGridItems({ products }: { products: Product[] }) <> {products.map((product) => ( - + diff --git a/components/product/gallery.tsx b/components/product/gallery.tsx index 99742a917..d1f567aef 100644 --- a/components/product/gallery.tsx +++ b/components/product/gallery.tsx @@ -27,13 +27,13 @@ export function Gallery({ images }: { images: { src: string; altText: string }[] 'h-full px-6 transition-all ease-in-out hover:scale-110 hover:text-black dark:hover:text-white flex items-center justify-center'; return ( -
-
+ <> +
{images[imageIndex] && ( {images[imageIndex]?.altText {images.length > 1 ? ( -
+
    {images.map((image, index) => { const isActive = index === imageIndex; const imageSearchParams = new URLSearchParams(searchParams.toString()); @@ -68,25 +68,26 @@ export function Gallery({ images }: { images: { src: string; altText: string }[] imageSearchParams.set('image', index.toString()); return ( - - - +
  • + + + +
  • ); })} -
+ ) : null} -
+ ); } From 9e1388f97409ec7a5bba9da1f0a0b3bdb1e7c13b Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Wed, 2 Aug 2023 21:17:11 -0500 Subject: [PATCH 2/2] Updates favicon (#1141) Co-authored-by: Lee Robinson --- app/favicon.ico | Bin 535 -> 15086 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/favicon.ico b/app/favicon.ico index c4826c94780efdd7e92092dc77fd4388fd8cd7f5..dc7d8431e47ee24c71eebaffe30786769b348353 100644 GIT binary patch literal 15086 zcmd^GTWAzX6m4-g@sXH`@A%578(qZ@6^)AEx+seJA)+9DC<(qIf}bu*kok~BOho(? zMKOx(j~|Mt_~Qfw1wjdF^h0Abh?s;#^B@nC+`Xsl>g}%X>Y3@8NoLrAo9cSpd(W+R z)vXxDC}Xs-bg98%*!ZW!FiH)>2#3vh$S@i>EyN-6D}FJIzq!EgT!vYUGA5*p-)}#I zSbt~DniZNndGh+g!ot4_3JPi_Oqfv1RG*)p-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