diff --git a/src/components/sections/ServicesSection.tsx b/src/components/sections/ServicesSection.tsx new file mode 100644 index 0000000..fd4e0cf --- /dev/null +++ b/src/components/sections/ServicesSection.tsx @@ -0,0 +1,73 @@ +'use client' +import { useMedusaProducts } from "@/hooks/useMedusaProducts" +import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/Card" +import Button from "@/components/ui/Button" +import Link from "next/link" +import { Star } from 'lucide-react' + +export default function ServicesSection() { + const { products: services, isLoading } = useMedusaProducts(8) + + if (isLoading) { + return ( + + + + Loading practice areas... + + + ) + } + + if (!services || services.length === 0) { + return null + } + + const formatPrice = (amount: number, code?: string) => { + const sym: Record = { zar: "R", usd: "$", eur: "\u20AC", gbp: "\u00A3" } + const s = sym[(code ?? "").toLowerCase()] ?? (code?.toUpperCase() ?? "") + return `${s}${(amount / 100).toFixed(2)}` + } + + return ( + + + + Our Practice Areas + + Specialised legal services for corporate executives, property developers, and business owners. + + + + {services.slice(0, 8).map((service) => { + const price = service.variants?.[0]?.prices?.[0] + return ( + + + {service.title} + {price && ( + + {formatPrice(price.amount, price.currency_code)} + + )} + + + + {service.description || "Comprehensive legal counsel tailored to your business needs."} + + + + + + Book Consultation + + + + + ) + })} + + + + ) +} \ No newline at end of file
Loading practice areas...
+ Specialised legal services for corporate executives, property developers, and business owners. +
+ {formatPrice(price.amount, price.currency_code)} +