From fed3a0fc02e20f85d5ca6d0b660108ebdd5c693d Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 4 Mar 2026 10:58:42 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index bc0686c..ecc4184 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,8 +11,11 @@ import FaqSplitText from "@/components/sections/faq/FaqSplitText"; import ContactSplitForm from "@/components/sections/contact/ContactSplitForm"; import FooterBase from "@/components/sections/footer/FooterBase"; import { Home, Users, Star, Globe } from "lucide-react"; +import { useState } from "react"; export default function HomePage() { + const [selectedVillaId, setSelectedVillaId] = useState(null); + const navItems = [ { name: "Anasayfa", id: "home" }, { name: "Villalar", id: "villas" }, @@ -22,7 +25,8 @@ export default function HomePage() { ]; const navButton = { - text: "Rezervasyon Yap", href: "/villas"}; + text: "Rezervasyon Yap", href: "/villas" + }; const footerColumns = [ { @@ -51,6 +55,15 @@ export default function HomePage() { }, ]; + const handleVillaClick = (villaId: string) => { + setSelectedVillaId(villaId); + // Scroll to contact section to show reservation activation + const contactSection = document.getElementById("contact"); + if (contactSection) { + contactSection.scrollIntoView({ behavior: "smooth" }); + } + }; + return ( handleVillaClick("villa-001"), + }, { - id: "villa-002", name: "Mediterranean Pearl", price: "₺15.000 / gün", imageSrc: "http://img.b2bpic.net/free-photo/scenic-view-sandy-beach-beach-with-sun-beds-umbrellas-open-against-sea-mountains-hotel-resort-tekirova-kemer-turkey_146671-18877.jpg?_wi=1", imageAlt: "Mediterranean Pearl - Sunset Terrace Villa"}, + id: "villa-002", name: "Mediterranean Pearl", price: "₺15.000 / gün", imageSrc: "http://img.b2bpic.net/free-photo/scenic-view-sandy-beach-beach-with-sun-beds-umbrellas-open-against-sea-mountains-hotel-resort-tekirova-kemer-turkey_146671-18877.jpg?_wi=1", imageAlt: "Mediterranean Pearl - Sunset Terrace Villa", onProductClick: () => handleVillaClick("villa-002"), + }, { - id: "villa-003", name: "Aegean Sunset", price: "₺18.500 / gün", imageSrc: "http://img.b2bpic.net/free-photo/modern-infinity-pool-perched-edge-cliff-overlooking-breathtaking-landscape_1268-31154.jpg?_wi=1", imageAlt: "Aegean Sunset - Private Pool & Sea View"}, + id: "villa-003", name: "Aegean Sunset", price: "₺18.500 / gün", imageSrc: "http://img.b2bpic.net/free-photo/modern-infinity-pool-perched-edge-cliff-overlooking-breathtaking-landscape_1268-31154.jpg?_wi=1", imageAlt: "Aegean Sunset - Private Pool & Sea View", onProductClick: () => handleVillaClick("villa-003"), + }, ]} gridVariant="three-columns-all-equal-width" animationType="slide-up" @@ -169,23 +185,26 @@ export default function HomePage() {
console.log("Form submitted:", data)} + buttonText={selectedVillaId ? "Rezervasyon Talebi Gönder" : "Mesaj Gönder"} + onSubmit={(data) => { + console.log("Form submitted:", { ...data, selectedVilla: selectedVillaId }); + setSelectedVillaId(null); + }} />
-- 2.49.1