From 1ff911df0bebd5f702c0b4093d21f24908cbc0bd Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Tue, 23 Jun 2026 08:39:10 +0000 Subject: [PATCH] Deploy --- src/components/sections/ServicesSection.tsx | 73 +++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/components/sections/ServicesSection.tsx 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."} + + + + + + + +
+ ) + })} +
+
+
+ ) +} \ No newline at end of file