-
- ({
- src: image.url,
- altText: image.altText
- }))}
- />
-
+
+
+
+ ({
+ src: image.url,
+ altText: image.altText
+ }))}
+ />
+
-
-
-
- {product.descriptionHtml ? (
-
- ) : null}
-
-
+
@@ -112,7 +103,7 @@ export default async function ProductPage({ params }: { params: { handle: string
-
+ >
);
}
@@ -124,9 +115,30 @@ async function RelatedProducts({ id }: { id: string }) {
return (
Related Products
-
-
-
+
+ {relatedProducts.map((product, i) => {
+ return (
+
+
+
+ );
+ })}
+
);
}
diff --git a/components/cart/add-to-cart.tsx b/components/cart/add-to-cart.tsx
index eecee848e..15582acc3 100644
--- a/components/cart/add-to-cart.tsx
+++ b/components/cart/add-to-cart.tsx
@@ -1,12 +1,12 @@
'use client';
+import { PlusIcon } from '@heroicons/react/24/outline';
import clsx from 'clsx';
import { addItem } from 'components/cart/actions';
-import { useRouter, useSearchParams } from 'next/navigation';
-import { useEffect, useState, useTransition } from 'react';
-
import LoadingDots from 'components/loading-dots';
import { ProductVariant } from 'lib/shopify/types';
+import { useRouter, useSearchParams } from 'next/navigation';
+import { useEffect, useState, useTransition } from 'react';
export function AddToCart({
variants,
@@ -50,15 +50,17 @@ export function AddToCart({
});
}}
className={clsx(
- 'flex w-full items-center justify-center bg-black p-4 text-sm uppercase tracking-wide text-white opacity-90 hover:opacity-100 dark:bg-white dark:text-black',
+ 'relative flex w-full items-center justify-center rounded-full bg-blue-600 p-4 tracking-wide text-white hover:opacity-90',
{
'cursor-not-allowed opacity-60': !availableForSale,
'cursor-not-allowed': isPending
}
)}
>
+
{availableForSale ? 'Add To Cart' : 'Out Of Stock'}
- {isPending ?
: null}
);
}
diff --git a/components/grid/tile.tsx b/components/grid/tile.tsx
index 6ddb31a65..8abbc38f2 100644
--- a/components/grid/tile.tsx
+++ b/components/grid/tile.tsx
@@ -22,15 +22,15 @@ export function GridTileImage({
return (
- {active !== undefined && active ? (
-
- ) : null}
{props.src ? (
) : null}
diff --git a/components/label.tsx b/components/label.tsx
index 4fadc0480..97dc82b1c 100644
--- a/components/label.tsx
+++ b/components/label.tsx
@@ -17,23 +17,32 @@ const Label = ({
return (
);
};
diff --git a/components/product/gallery.tsx b/components/product/gallery.tsx
index 2d5bfecea..b0730a9d8 100644
--- a/components/product/gallery.tsx
+++ b/components/product/gallery.tsx
@@ -1,22 +1,12 @@
'use client';
-import { useState } from 'react';
-
-import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
+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';
-export function Gallery({
- title,
- amount,
- currencyCode,
- images
-}: {
- title: string;
- amount: string;
- currencyCode: string;
- images: { src: string; altText: string }[];
-}) {
+export function Gallery({ images }: { images: { src: string; altText: string }[] }) {
const [currentImage, setCurrentImage] = useState(0);
function handleNavigate(direction: 'next' | 'previous') {
@@ -28,56 +18,53 @@ export function Gallery({
}
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.length > 1 ? (
-
-
-
+
+
+
+
+
+
) : null}
{images.length > 1 ? (
-
+
{images.map((image, index) => {
const isActive = index === currentImage;
return (