Deploy
This commit is contained in:
@@ -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 (
|
||||
<section data-vula-section="rooms" id="themed-luxury-rooms" className="py-20 bg-[#FDF6EC]">
|
||||
<div className="container mx-auto px-4 text-center text-[#2C1810]/60">
|
||||
Loading rooms…
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<section id="themed-luxury-rooms" className="py-20 bg-[#FDF6EC]">
|
||||
<div className="container mx-auto px-4">
|
||||
<h2 className="text-3xl lg:text-4xl font-bold text-[#2C1810] text-center mb-16">
|
||||
Themed Luxury Rooms
|
||||
</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{rooms?.map((room: any) => (
|
||||
<Card key={room.id} className="overflow-hidden shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] hover:-translate-y-0.5 transition-all duration-200 ease-out rounded-xl">
|
||||
<div className="relative h-48 w-full overflow-hidden">
|
||||
<Image
|
||||
src={room.thumbnail || 'https://images.pexels.com/photos/19840954/pexels-photo-19840954.jpeg?auto=compress&cs=tinysrgb&h=350'}
|
||||
alt={room.title}
|
||||
fill
|
||||
className="object-cover hover:scale-105 transition-transform duration-500 ease-out"
|
||||
sizes="(max-width: 768px) 100vw, 33vw"
|
||||
/>
|
||||
</div>
|
||||
<div className="p-5">
|
||||
<CardTitle className="text-xl font-bold text-[#2C1810] mb-2">{room.title}</CardTitle>
|
||||
<p className="text-[#2C1810]/70 text-sm mb-4 line-clamp-2">{room.description}</p>
|
||||
<div className="flex flex-wrap gap-3 mb-4">
|
||||
{amenityIcons.map((a, i) => {
|
||||
const Icon = a.icon
|
||||
return (
|
||||
<span key={i} className="flex items-center gap-1 text-xs text-[#E67E22]">
|
||||
<Icon className="w-4 h-4" />
|
||||
{a.label}
|
||||
</span>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<CardFooter className="p-5 pt-0">
|
||||
<Link href={`/booking/${room.id}`} className="w-full">
|
||||
<Button variant="default" className="w-full bg-[#C0392B] hover:opacity-90">
|
||||
Book Now
|
||||
</Button>
|
||||
</Link>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user