From 0b75d2de9e77fb8fffa63ec45ee81cdd9fd3fe10 Mon Sep 17 00:00:00 2001 From: timur Date: Tue, 10 Oct 2023 09:34:51 +0200 Subject: [PATCH 1/5] Remove misleading hover effect --- src/ui/atoms/ProductImageWrapper.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/atoms/ProductImageWrapper.tsx b/src/ui/atoms/ProductImageWrapper.tsx index 8dba9dd71..34ed4db1d 100644 --- a/src/ui/atoms/ProductImageWrapper.tsx +++ b/src/ui/atoms/ProductImageWrapper.tsx @@ -2,10 +2,10 @@ import NextImage, { type ImageProps } from "next/image"; export const ProductImageWrapper = (props: ImageProps) => { return ( -
+
); From 83b2a6a83755b58c5d50b5fab3e61b72aa65d4a4 Mon Sep 17 00:00:00 2001 From: timur Date: Tue, 10 Oct 2023 09:38:40 +0200 Subject: [PATCH 2/5] Use consistent color --- src/app/cart/CheckoutLink.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/cart/CheckoutLink.tsx b/src/app/cart/CheckoutLink.tsx index fa0bdd2b8..ffe656be2 100644 --- a/src/app/cart/CheckoutLink.tsx +++ b/src/app/cart/CheckoutLink.tsx @@ -13,7 +13,7 @@ export const CheckoutLink = ({ disabled, checkoutId }: Props) => { aria-disabled={disabled} onClick={(e) => disabled && e.preventDefault()} href={`/checkout?checkout=${checkoutId}`} - className="w-full rounded border border-transparent bg-pink-600 px-6 py-3 text-center font-medium text-gray-50 hover:bg-pink-500 aria-disabled:cursor-not-allowed aria-disabled:bg-pink-500 sm:col-start-2" + className="w-full rounded border border-transparent bg-slate-600 px-6 py-3 text-center font-medium text-gray-50 hover:bg-slate-500 aria-disabled:cursor-not-allowed aria-disabled:bg-slate-500 sm:col-start-2" > Checkout From 5e1dfbec0cd4a79655fa1276e69f28cf53194c92 Mon Sep 17 00:00:00 2001 From: timur Date: Tue, 10 Oct 2023 09:39:38 +0200 Subject: [PATCH 3/5] Remove unused file --- src/app/cart/CheckoutButton.tsx | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/app/cart/CheckoutButton.tsx diff --git a/src/app/cart/CheckoutButton.tsx b/src/app/cart/CheckoutButton.tsx deleted file mode 100644 index 7a5b3e749..000000000 --- a/src/app/cart/CheckoutButton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -"use client"; - -import { useTransition } from "react"; - -export const CheckoutButton = ({ performCheckout }: { performCheckout: () => Promise }) => { - const [isPending, startTransition] = useTransition(); - const handleClick = () => { - if (isPending) return; - startTransition(() => performCheckout()); - }; - - return ( - - ); -}; From 515c89d15d57475ee656d772d490fffdb34c4e64 Mon Sep 17 00:00:00 2001 From: timur Date: Tue, 10 Oct 2023 09:59:38 +0200 Subject: [PATCH 4/5] Use black instead of slate --- src/app/cart/CheckoutLink.tsx | 2 +- src/app/products/[slug]/AddButton.tsx | 2 +- src/app/products/[slug]/page.tsx | 8 ++++---- src/ui/components/VariantSelector.tsx | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/cart/CheckoutLink.tsx b/src/app/cart/CheckoutLink.tsx index ffe656be2..6a2a16698 100644 --- a/src/app/cart/CheckoutLink.tsx +++ b/src/app/cart/CheckoutLink.tsx @@ -13,7 +13,7 @@ export const CheckoutLink = ({ disabled, checkoutId }: Props) => { aria-disabled={disabled} onClick={(e) => disabled && e.preventDefault()} href={`/checkout?checkout=${checkoutId}`} - className="w-full rounded border border-transparent bg-slate-600 px-6 py-3 text-center font-medium text-gray-50 hover:bg-slate-500 aria-disabled:cursor-not-allowed aria-disabled:bg-slate-500 sm:col-start-2" + className="w-full rounded border border-transparent bg-gray-900 px-6 py-3 text-center font-medium text-gray-50 hover:bg-gray-800 aria-disabled:cursor-not-allowed aria-disabled:bg-gray-500 sm:col-start-2" > Checkout diff --git a/src/app/products/[slug]/AddButton.tsx b/src/app/products/[slug]/AddButton.tsx index 721784e22..2b01a8f9f 100644 --- a/src/app/products/[slug]/AddButton.tsx +++ b/src/app/products/[slug]/AddButton.tsx @@ -11,7 +11,7 @@ export function AddButton({ disabled }: { disabled?: boolean }) { type="submit" aria-disabled={isButtonDisabled} onClick={(e) => isButtonDisabled && e.preventDefault()} - className="h-12 w-full max-w-md items-center rounded-md bg-slate-700 px-6 py-3 text-base font-medium leading-6 text-white shadow transition duration-150 ease-in-out hover:bg-slate-600 disabled:cursor-not-allowed disabled:opacity-70 hover:disabled:bg-slate-700 aria-disabled:cursor-not-allowed aria-disabled:opacity-70 hover:aria-disabled:bg-slate-700" + className="h-12 items-center rounded-md bg-gray-900 px-6 py-3 text-base font-medium leading-6 text-white shadow hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-70 hover:disabled:bg-gray-700 aria-disabled:cursor-not-allowed aria-disabled:opacity-70 hover:aria-disabled:bg-gray-700" > {pending ? (
diff --git a/src/app/products/[slug]/page.tsx b/src/app/products/[slug]/page.tsx index cb614f8ab..8b8b5d49e 100644 --- a/src/app/products/[slug]/page.tsx +++ b/src/app/products/[slug]/page.tsx @@ -118,10 +118,10 @@ export default async function Page(props: { params: { slug: string }; searchPara {firstImage && ( )} -
+
-

{product?.name}

-

+

{product?.name}

+

{selectedVariant?.pricing?.price?.gross ? formatMoney( selectedVariant.pricing.price.gross.amount, @@ -131,7 +131,7 @@ export default async function Page(props: { params: { slug: string }; searchPara

{variants && } -
+
diff --git a/src/ui/components/VariantSelector.tsx b/src/ui/components/VariantSelector.tsx index 3be6907d2..2f66a3bad 100644 --- a/src/ui/components/VariantSelector.tsx +++ b/src/ui/components/VariantSelector.tsx @@ -42,7 +42,7 @@ export function VariantSelector(props: { variants: { id: string; name: string }[ return (
Variants -
+
{variants.length > 1 && variants.map((variant) => { return ( @@ -54,8 +54,8 @@ export function VariantSelector(props: { variants: { id: string; name: string }[ }} className={clsx( searchParams.get("variant") === variant.id - ? "border-transparent bg-slate-600 text-white hover:bg-slate-500" - : "border-slate-200 bg-white text-slate-900 hover:bg-slate-100", + ? "border-transparent bg-gray-900 text-white hover:bg-gray-800" + : "border-gray-200 bg-white text-gray-900 hover:bg-gray-100", "flex items-center justify-center overflow-hidden text-ellipsis rounded border p-3 text-center text-sm font-semibold focus-within:outline focus-within:outline-2", )} role="radio" From 4baafd2255d6efe751219609a9a22a24eb3a0146 Mon Sep 17 00:00:00 2001 From: timur Date: Tue, 10 Oct 2023 10:03:06 +0200 Subject: [PATCH 5/5] Remove redundant message --- src/ui/components/Footer.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/ui/components/Footer.tsx b/src/ui/components/Footer.tsx index 4c3714640..aa0b8b253 100644 --- a/src/ui/components/Footer.tsx +++ b/src/ui/components/Footer.tsx @@ -40,16 +40,6 @@ export function Footer() { ))}
-
-

Check it out

- -