diff --git a/src/components/sections/SignatureServicesSection.tsx b/src/components/sections/SignatureServicesSection.tsx new file mode 100644 index 0000000..c854e28 --- /dev/null +++ b/src/components/sections/SignatureServicesSection.tsx @@ -0,0 +1,85 @@ +'use client' + +import Image from 'next/image' +import Link from 'next/link' +import { ArrowRight, Sparkles } from 'lucide-react' +import { Card, CardContent } from '@/components/ui/Card' +import Badge from '@/components/ui/Badge' +import { useProducts } from '@/hooks/useProducts' + +const CURRENCY_SYMBOLS: Record = { zar: 'R', usd: '$', eur: '€', gbp: '£', kes: 'KSh', ngn: '₦', ghs: '₵' } + +const formatPrice = (amount = 0, code = 'zar') => { + const symbol = CURRENCY_SYMBOLS[(code ?? '').toLowerCase()] ?? (code?.toUpperCase() ?? '') + return `${symbol}${Number(amount || 0).toFixed(0)}` +} + +function ServiceCard({ service }: { service: any }) { + const firstVariant = service.variants?.[0] + const price = firstVariant?.price_amount ?? service.price_amount ?? 0 + const currency = firstVariant?.currency_code ?? service.currency_code ?? 'zar' + const image = service.thumbnail + + return ( + +
+ {image ? ( + {service.title} + ) : ( +
+ +
+ )} +
+ +
+
+

{service.title}

+ + {price > 0 ? formatPrice(price, currency) : 'On request'} + +
+

{service.description ?? ''}

+
+
+ {price > 0 ? 'From ' + formatPrice(price, currency) : 'Price on request'} + + Book this service + +
+
+
+ ) +} + +export default function SignatureServicesSection() { + const { products = [], isLoading } = useProducts(8) + + return ( +
+
+
+

Signature services

+

Find your exact service, see the price, book in minutes.

+

Cuts, colour, keratin, perms, braids and nails — each service priced transparently, each bookable in under a minute.

+
+ + {isLoading ? ( +
+ {[1, 2, 3, 4].map((i) => ( +
+ ))} +
+ ) : products.length === 0 ? ( +

Our full service menu is being updated. Please check back soon.

+ ) : ( +
+ {products.slice(0, 8).map((service: any) => ( + + ))} +
+ )} +
+
+ ) +} \ No newline at end of file