diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index d00c483bc..497c34104 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -2,14 +2,14 @@ import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { Suspense } from 'react'; -import Grid from 'components/grid'; +import { GridTileImage } from 'components/grid/tile'; import Footer from 'components/layout/footer'; -import ProductGridItems from 'components/layout/product-grid-items'; import { Gallery } from 'components/product/gallery'; import { ProductDescription } from 'components/product/product-description'; import { HIDDEN_PRODUCT_TAG } from 'lib/constants'; import { getProduct, getProductRecommendations } from 'lib/shopify'; import { Image } from 'lib/shopify/types'; +import Link from 'next/link'; export const runtime = 'edge'; @@ -81,7 +81,7 @@ export default async function ProductPage({ params }: { params: { handle: string __html: JSON.stringify(productJsonLd) }} /> -
+
({ @@ -91,7 +91,7 @@ export default async function ProductPage({ params }: { params: { handle: string />
-
+
@@ -113,9 +113,30 @@ async function RelatedProducts({ id }: { id: string }) { return (
Related Products
- - - +
+ {relatedProducts.map((product, i) => { + return ( + + + + ); + })} +
); } diff --git a/components/carousel.tsx b/components/carousel.tsx index 72bb4d47d..2a8d2526f 100644 --- a/components/carousel.tsx +++ b/components/carousel.tsx @@ -10,8 +10,8 @@ export async function Carousel() { if (!products?.length) return null; return ( -
-
+
+
{[...products, ...products].map((product, i) => ( - {active !== undefined && active ? ( - - ) : null} {props.src ? ( ) : null} diff --git a/components/label.tsx b/components/label.tsx index 4fadc0480..5778e23cf 100644 --- a/components/label.tsx +++ b/components/label.tsx @@ -17,23 +17,32 @@ const Label = ({ return (
-

- {title} -

- +
+

+ {title} +

+ +
); }; diff --git a/components/product/gallery.tsx b/components/product/gallery.tsx index c565452c3..13711cdb1 100644 --- a/components/product/gallery.tsx +++ b/components/product/gallery.tsx @@ -1,6 +1,7 @@ 'use client'; import { ArrowLeftIcon, ArrowRightIcon } from '@heroicons/react/24/outline'; +import clsx from 'clsx'; import { GridTileImage } from 'components/grid/tile'; import Image from 'next/image'; import { useState } from 'react'; @@ -17,14 +18,14 @@ export function Gallery({ images }: { images: { src: string; altText: string }[] } const buttonClassName = - 'px-9 cursor-pointer ease-in-and-out duration-200 transition-bg bg-[#7928ca] hover:bg-violetDark'; + 'h-full px-6 transition-all ease-in-out hover:scale-110 hover:text-black dark:hover:text-white'; return (
-
+
{images[currentImage] && ( {images[currentImage]?.altText 1 ? (
-
+
-
- - {/* - */}
) : null}
{images.length > 1 ? ( -
+
{images.map((image, index) => { const isActive = index === currentImage; return (