'use client'; import React from 'react'; import { useParams } from 'next/navigation'; import { useCollectionProducts } from '@/hooks/use-shopify-collections'; import ProductCard from './product-card'; const CollectionDetail: React.FC = () => { const params = useParams(); const handle = params?.handle as string; const { collection, loading, error } = useCollectionProducts(handle); // Format title from handle const formattedTitle = handle ? handle.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase()) : 'Collection'; if (loading) { return (
The collection you are looking for does not exist or is no longer available.
This collection doesn't have any products yet.