diff --git a/src/components/sections/RoomsSection.tsx b/src/components/sections/RoomsSection.tsx new file mode 100644 index 0000000..d52efe8 --- /dev/null +++ b/src/components/sections/RoomsSection.tsx @@ -0,0 +1,76 @@ +'use client' + +import { useMedusaProducts } from '@/hooks/useMedusaProducts' +import Image from 'next/image' +import Link from 'next/link' +import { Snowflake, Star, Tv, Wifi } from 'lucide-react' +import { Card, CardContent, CardFooter, CardTitle } from '@/components/ui/Card' +import Button from '@/components/ui/Button' + +export default function RoomsSection() { + const { products: rooms, isLoading } = useMedusaProducts(6) + + const amenityIcons = [ + { icon: Snowflake, label: 'Air conditioning' }, + { icon: Tv, label: 'TV with DStv' }, + { icon: Wifi, label: 'Wi-Fi' }, + { icon: Star, label: 'En-suite' }, + ] + + if (isLoading) { + return ( + + + Loading rooms… + + + ) + } + + return ( + + + + Themed Luxury Rooms + + + {rooms?.map((room: any) => ( + + + + + + {room.title} + {room.description} + + {amenityIcons.map((a, i) => { + const Icon = a.icon + return ( + + + {a.label} + + ) + })} + + + + + + Book Now + + + + + ))} + + + + ) +} \ No newline at end of file
{room.description}