diff --git a/src/components/sections/FeaturedTeesSection.tsx b/src/components/sections/FeaturedTeesSection.tsx new file mode 100644 index 0000000..15f02dc --- /dev/null +++ b/src/components/sections/FeaturedTeesSection.tsx @@ -0,0 +1,102 @@ +'use client' +import { useMedusaProducts } from '@/hooks/useMedusaProducts' +import { useRouter } from 'next/navigation' +import Button from '@/components/ui/Button' +import { ShoppingBag } from 'lucide-react' + +const CURRENCY_SYMBOLS: Record = { + zar: 'R', usd: '$', eur: '€', gbp: '£', kes: 'KSh', ngn: '₦', ghs: '₵' +} + +const formatPrice = (amount: number, code?: string) => { + const sym = CURRENCY_SYMBOLS[(code ?? '').toLowerCase()] ?? (code?.toUpperCase() ?? '') + return `${sym}${(amount / 100).toFixed(2)}` +} + +export default function FeaturedTeesSection() { + const { products, isLoading } = useMedusaProducts(8) + const router = useRouter() + + if (isLoading) { + return ( +
+
+
+ ) + } + + if (!products || products.length === 0) return null + + return ( + + ) +} \ No newline at end of file