'use client'; import React from 'react'; import { useCollections } from '@/hooks/use-shopify-collections'; import CollectionCard from './collection-card'; import { Button } from '@/components/ui/button'; interface CollectionsProps { title?: string; } const Collections: React.FC = ({ title = 'Our Collections', }) => { const { collections, loading, error, refetch } = useCollections(12); if (loading) { return (
EXPLORE

{title}

Handpicked stories and themes

{Array.from({ length: 6 }).map((_, index) => (
))}
); } if (error) { return (

{title}

Unable to load collections

{error}

); } if (collections.length === 0) { return (

{title}

No collections found

Collections will appear here once added to your Shopify store.

); } return (
THEMES & STORIES

{title}

Discover our carefully crafted worlds

{collections.map((collection) => ( ))}
); }; export default Collections;