diff --git a/src/components/sections/BespokeSafariExperiencesSection.tsx b/src/components/sections/BespokeSafariExperiencesSection.tsx new file mode 100644 index 0000000..f416a5a --- /dev/null +++ b/src/components/sections/BespokeSafariExperiencesSection.tsx @@ -0,0 +1,89 @@ +'use client' + +import { useMedusaProducts } from '@/hooks/useMedusaProducts' +import Image from 'next/image' +import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/Card' +import Button from '@/components/ui/Button' +import { Clock, MapPin, Users } from 'lucide-react' + +export default function BespokeSafariExperiencesSection() { + const { products: services, isLoading } = useMedusaProducts(8) + const fallbackImage = 'https://images.pexels.com/photos/8096930/pexels-photo-8096930.jpeg?auto=compress&cs=tinysrgb&h=350' + + if (isLoading) { + return ( +
+
+

Loading experiences…

+
+
+ ) + } + + if (!services || services.length === 0) { + return ( +
+
+

No experiences available at the moment.

+
+
+ ) + } + + return ( +
+
+
+
+ +

Bespoke Safari Experiences

+ +
+

+ Tailored to you and the wild +

+
+
+ {services.slice(0, 8).map((service) => { + const image = service.thumbnail || fallbackImage + const variant = service.variants?.[0] + const price = variant?.prices?.[0] + const amount = price ? (price.amount / 100).toFixed(2) : null + return ( + +
+ {service.title +
+ + {service.title} + + +

{service.description}

+ {amount && ( +

From R{amount}

+ )} +
+ + + +
+ ) + })} +
+
+ +
+
+
+ ) +} \ No newline at end of file