This commit is contained in:
2025-08-27 14:47:06 +02:00
parent f98110da57
commit 5ca1f1a3f7
2 changed files with 33 additions and 12 deletions

View File

@@ -1,3 +1,6 @@
'use client'
import { useState } from 'react'
import { CallToAction3 } from '@/components/CallToAction3' import { CallToAction3 } from '@/components/CallToAction3'
import { Footer } from '@/components/Footer' import { Footer } from '@/components/Footer'
import { Header } from '@/components/Header' import { Header } from '@/components/Header'
@@ -9,16 +12,30 @@ import Veda3 from '@/components/Veda3'
import Veda4 from '@/components/Veda4' import Veda4 from '@/components/Veda4'
export default function Dahabiyas() { export default function Dahabiyas() {
const [selectedVeda, setSelectedVeda] = useState('veda1')
const renderSelectedVeda = () => {
switch (selectedVeda) {
case 'veda1':
return <Veda1 />
case 'veda2':
return <Veda2 />
case 'veda3':
return <Veda3 />
case 'veda4':
return <Veda4 />
default:
return <Veda1 />
}
}
return ( return (
<> <>
<Header /> <Header />
<main> <main>
<Daha1 /> <Daha1 />
<Daha2 /> <Daha2 onVedaSelect={setSelectedVeda} />
<Veda1 /> {renderSelectedVeda()}
<Veda2 />
<Veda3 />
<Veda4 />
</main> </main>
<Footer /> <Footer />
</> </>

View File

@@ -5,41 +5,45 @@ import { H3, H4, PXXS } from '@/components/text';
const categories = [ const categories = [
{ {
name: 'VEDA I', name: 'VEDA I',
href: '#', vedaId: 'veda1',
image: '/images/veda1.jpg', image: '/images/veda1.jpg',
imageAlt: 'veda1', imageAlt: 'veda1',
description: 'The ideal retreat for space and privacy, perfect for intimate gatherings.', description: 'The ideal retreat for space and privacy, perfect for intimate gatherings.',
}, },
{ {
name: 'VEDA II', name: 'VEDA II',
href: '#', vedaId: 'veda2',
image: '/images/veda2.jpg', image: '/images/veda2.jpg',
imageAlt: 'veda2', imageAlt: 'veda2',
description: 'The perfect blend of spaciousness and privacy, great for larger groups seeking comfort.', description: 'The perfect blend of spaciousness and privacy, great for larger groups seeking comfort.',
}, },
{ {
name: 'VEDA III', name: 'VEDA III',
href: '#', vedaId: 'veda3',
image: '/images/veda3.jpg', image: '/images/veda3.jpg',
imageAlt: 'veda3', imageAlt: 'veda3',
description: ' An ideal choice for those valuing privacy and intimacy in a cozy setting.', description: ' An ideal choice for those valuing privacy and intimacy in a cozy setting.',
}, },
{ {
name: 'VEDA IV', name: 'VEDA IV',
href: '#', vedaId: 'veda4',
image: '/images/veda4.jpg', image: '/images/veda4.jpg',
imageAlt: 'veda4.', imageAlt: 'veda4.',
description: 'Spacious and private, this option accommodates larger gatherings with ease.', description: 'Spacious and private, this option accommodates larger gatherings with ease.',
}, },
] ]
export default function Daha2() { export default function Daha2({ onVedaSelect }) {
return ( return (
<div className="bg-transparent"> <div className="bg-transparent">
<div className="mx-auto max-w-xl px-6 pt-4 pb-12 lg:max-w-7xl lg:px-0"> <div className="mx-auto max-w-xl px-6 pt-4 pb-12 lg:max-w-7xl lg:px-0">
<div className="mt-10 space-y-12 lg:grid lg:grid-cols-4 lg:gap-x-2 lg:space-y-0"> <div className="mt-10 space-y-12 lg:grid lg:grid-cols-4 lg:gap-x-2 lg:space-y-0">
{categories.map((category) => ( {categories.map((category) => (
<a key={category.name} href={category.href} className="group block"> <div
key={category.name}
className="group block cursor-pointer"
onClick={() => onVedaSelect(category.vedaId)}
>
<div <div
aria-hidden="true" aria-hidden="true"
className="aspect-h-2 aspect-w-3 overflow-hidden rounded-sm lg:aspect-h-9 lg:aspect-w-16 group-hover:opacity-75" className="aspect-h-2 aspect-w-3 overflow-hidden rounded-sm lg:aspect-h-9 lg:aspect-w-16 group-hover:opacity-75"
@@ -52,7 +56,7 @@ export default function Daha2() {
</div> </div>
<H4 className="px-1 mt-4 text-base font-semibold text-gray-900">{category.name}</H4> <H4 className="px-1 mt-4 text-base font-semibold text-gray-900">{category.name}</H4>
<PXXS className="mt-1 px-1">{category.description}</PXXS> <PXXS className="mt-1 px-1">{category.description}</PXXS>
</a> </div>
))} ))}
</div> </div>
</div> </div>