-
+
diff --git a/components/cart/add-to-cart.tsx b/components/cart/add-to-cart.tsx
index e49cf822e..8788e6383 100644
--- a/components/cart/add-to-cart.tsx
+++ b/components/cart/add-to-cart.tsx
@@ -1,10 +1,10 @@
'use client';
-import { PlusIcon } from '@heroicons/react/24/outline';
import clsx from 'clsx';
import { addItem } from 'components/cart/actions';
import LoadingDots from 'components/loading-dots';
import { ProductVariant } from 'lib/shopify/types';
+import { useTranslations } from 'next-intl';
import { useRouter, useSearchParams } from 'next/navigation';
import { useTransition } from 'react';
@@ -17,6 +17,8 @@ export function AddToCart({
}) {
const router = useRouter();
const searchParams = useSearchParams();
+ const t = useTranslations('Index');
+
const [isPending, startTransition] = useTransition();
const defaultVariantId = variants.length === 1 ? variants[0]?.id : undefined;
const variant = variants.find((variant: ProductVariant) =>
@@ -52,17 +54,18 @@ export function AddToCart({
});
}}
className={clsx(
- 'relative flex w-full items-center justify-center rounded-md bg-white/20 p-4 font-sans tracking-wide text-white hover:opacity-90',
+ 'relative flex w-full items-center justify-center bg-white p-4 font-serif text-xl tracking-wide text-black hover:opacity-90',
{
'cursor-not-allowed opacity-60 hover:opacity-60': !availableForSale || !selectedVariantId,
'cursor-not-allowed': isPending
}
)}
>
-
-
{availableForSale ? 'Add To Cart' : 'Out Of Stock'}
+ {!isPending ? (
+
{availableForSale ? t('cart.add') : t('cart.out-of-stock')}
+ ) : (
+
+ )}
);
}
diff --git a/components/grid/three-items.tsx b/components/grid/three-items.tsx
index cdf50edea..0a4ae1fa8 100644
--- a/components/grid/three-items.tsx
+++ b/components/grid/three-items.tsx
@@ -10,27 +10,26 @@ function ThreeItemGridItem({ item, priority }: { item: Product; priority?: boole
const size = item?.variants?.[0]?.selectedOptions?.find((option) => option.name === 'Size');
return (
-
-
+
+
+
+
+
+
+
{item?.summary?.value}
+
-
-
-
{item?.summary?.value}
-
);
}
diff --git a/components/layout/footer.tsx b/components/layout/footer.tsx
index 116873c8b..776b80896 100644
--- a/components/layout/footer.tsx
+++ b/components/layout/footer.tsx
@@ -20,7 +20,7 @@ export default async function Footer({ cart }: { cart?: Cart }) {
diff --git a/components/product/gallery.tsx b/components/product/gallery.tsx
index 064da418f..4be5e217b 100644
--- a/components/product/gallery.tsx
+++ b/components/product/gallery.tsx
@@ -28,7 +28,7 @@ export function Gallery({ images }: { images: { src: string; altText: string }[]
return (
<>
-
+
{images[imageIndex] && (
-
-
-
{product.descriptionHtml ? (
) : null}
-
-
>
);
}
diff --git a/components/product/variant-selector.tsx b/components/product/variant-selector.tsx
index 89f2a322c..9afb72bc9 100644
--- a/components/product/variant-selector.tsx
+++ b/components/product/variant-selector.tsx
@@ -89,12 +89,12 @@ export function VariantSelector({
href={optionUrl}
title={`${option.name} ${value}${!isAvailableForSale ? ' (Out of Stock)' : ''}`}
className={clsx(
- 'flex min-w-[48px] items-center justify-center rounded-full border bg-neutral-100 px-2 py-1 text-sm dark:border-neutral-800 dark:bg-neutral-900',
+ 'flex min-w-[48px] items-center justify-center rounded-full border bg-white px-2 py-1 text-sm text-black',
{
- 'cursor-default ring-2 ring-blue-600': isActive,
- 'ring-1 ring-transparent transition duration-300 ease-in-out hover:scale-110 hover:ring-blue-600 ':
+ 'cursor-default ring-2 hover:ring-dark/50': isActive,
+ 'ring-1 ring-transparent transition duration-300 ease-in-out hover:scale-110 hover:ring-dark/30 ':
!isActive && isAvailableForSale,
- 'relative z-10 cursor-not-allowed overflow-hidden bg-neutral-100 text-neutral-500 ring-1 ring-neutral-300 before:absolute before:inset-x-0 before:-z-10 before:h-px before:-rotate-45 before:bg-neutral-300 before:transition-transform dark:bg-neutral-900 dark:text-neutral-400 dark:ring-neutral-700 before:dark:bg-neutral-700':
+ 'relative z-10 cursor-not-allowed overflow-hidden bg-white text-black ring-1 ring-white before:absolute before:inset-x-0 before:-z-10 before:h-px before:-rotate-45 before:bg-neutral-300 before:transition-transform':
!isAvailableForSale
}
)}
diff --git a/messages/en.json b/messages/en.json
index 6e826479f..3eee3f7e7 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -48,6 +48,10 @@
"newsletter": {
"promo": "Get 10% off on your first order. Get discount."
}
+ },
+ "cart": {
+ "add": "Add to cart",
+ "out-of-stock": "Out of stock"
}
}
}
diff --git a/messages/ja.json b/messages/ja.json
index 50e128964..5325a5312 100644
--- a/messages/ja.json
+++ b/messages/ja.json
@@ -46,8 +46,12 @@
},
"footer": {
"newsletter": {
- "promo": "Get 10% off on your first order. Get discount."
+ "promo": "初回注文で10%割引。割引を受ける。"
}
+ },
+ "cart": {
+ "add": "カートに入れる",
+ "out-of-stock": "品切れ中"
}
}
}