From b0116ac0cb61bacb0dead04e2980991a74bf94cb Mon Sep 17 00:00:00 2001 From: Rami Bitar Date: Wed, 10 Jun 2026 14:11:11 -0400 Subject: [PATCH] Redesign not-found and error states with clean black/white text Replace red alert boxes, icons, borders, and buttons with simple centered text for product/collection not-found, load-failure, and empty states. Co-Authored-By: Claude Fable 5 --- components/shopify/collection-detail.tsx | 45 +++++++-------------- components/shopify/collections.tsx | 33 +++++---------- components/shopify/product-detail/index.tsx | 27 ++++--------- components/shopify/products.tsx | 31 +++++--------- 4 files changed, 42 insertions(+), 94 deletions(-) diff --git a/components/shopify/collection-detail.tsx b/components/shopify/collection-detail.tsx index 17913f4..2d4ee70 100644 --- a/components/shopify/collection-detail.tsx +++ b/components/shopify/collection-detail.tsx @@ -9,7 +9,7 @@ const CollectionDetail: React.FC = () => { const params = useParams(); const handle = params?.handle as string; - const { collection, loading, error, refetch } = useCollectionProducts(handle); + const { collection, loading, error } = useCollectionProducts(handle); // Format title from handle const formattedTitle = handle @@ -42,26 +42,14 @@ const CollectionDetail: React.FC = () => { if (error) { return (
-
-

- {formattedTitle} +
+

+ Collection Not Found

- -
- -

- Failed to Load Collection -

-

- {error} -

- -
+

+ The collection you are looking for does not exist or is no longer + available. +

); @@ -78,16 +66,13 @@ const CollectionDetail: React.FC = () => { {products.length === 0 ? ( -
-
- -

- No Products in Collection -

-

- This collection doesn't have any products yet. -

-
+
+

+ No Products in Collection +

+

+ This collection doesn't have any products yet. +

) : (
diff --git a/components/shopify/collections.tsx b/components/shopify/collections.tsx index 7d29577..303d500 100644 --- a/components/shopify/collections.tsx +++ b/components/shopify/collections.tsx @@ -5,7 +5,7 @@ import { useCollections } from '@/hooks/use-shopify-collections'; import CollectionCard from './collection-card'; const Collections: React.FC = () => { - const { collections, loading, error, refetch } = useCollections(20); + const { collections, loading, error } = useCollections(20); if (loading) { return ( @@ -32,26 +32,14 @@ const Collections: React.FC = () => { if (error) { return (
-
-

- Our Collections +
+

+ Collections Unavailable

- -
- -

- Failed to Load Collections -

-

- {error} -

- -
+

+ We couldn't load any collections right now. Please try again + later. +

); @@ -65,9 +53,8 @@ const Collections: React.FC = () => { Our Collections -
- -

+
+

No Collections Found

diff --git a/components/shopify/product-detail/index.tsx b/components/shopify/product-detail/index.tsx index ae2d7e0..1664120 100644 --- a/components/shopify/product-detail/index.tsx +++ b/components/shopify/product-detail/index.tsx @@ -8,9 +8,6 @@ import { useShopifyCart } from '@/hooks/use-shopify-cart'; import ProductDetailGallery from './product-detail-gallery'; import ProductDetailInfo from './product-detail-info'; import ProductRecommendations from '../product-recommendations'; -import { Button } from '@/components/ui/button'; -import { Alert, AlertTitle, AlertDescription } from '@/components/ui/alert'; -import { RiErrorWarningLine } from '@remixicon/react'; import { Breadcrumb, BreadcrumbList, @@ -128,22 +125,14 @@ const ProductDetail: React.FC = ({ handle: handleProp }) => if (error || !product) { return ( -

- - - - Product Not Found - - - {error || 'The requested product could not be found.'} - - - +
+

+ Product Not Found +

+

+ The product you are looking for does not exist or is no longer + available. +

); } diff --git a/components/shopify/products.tsx b/components/shopify/products.tsx index e29ba38..8e528c7 100644 --- a/components/shopify/products.tsx +++ b/components/shopify/products.tsx @@ -142,26 +142,14 @@ const Products: React.FC = ({ if (error) { return (
-
-

- {title} +
+

+ Products Unavailable

- -
- -

- Failed to Load Products -

-

- {error} -

- -
+

+ We couldn't load any products right now. Please try again + later. +

); @@ -175,9 +163,8 @@ const Products: React.FC = ({ {title}

-
- -

+
+

No Products Found