diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index df15d93..7573d14 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -4,8 +4,29 @@ import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; import SiteBackgroundSlot from "@/components/ui/SiteBackgroundSlot"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; +import { useEffect, useRef } from 'react'; +import Modal from '@/components/ui/Modal'; +import Input from '@/components/ui/Input'; +import Textarea from '@/components/ui/Textarea'; +import Label from '@/components/ui/Label'; +import Button from '@/components/ui/Button'; export default function Layout() { + const triggerRef = useRef(null); + + useEffect(() => { + const handleClick = (e: MouseEvent) => { + const target = e.target as HTMLElement; + const link = target.closest('a'); + if (link && link.getAttribute('href') === '#contact-modal') { + e.preventDefault(); + triggerRef.current?.click(); + } + }; + document.addEventListener('click', handleClick); + return () => document.removeEventListener('click', handleClick); + }, []); + const navItems = [ { "name": "Bemutatkozás", @@ -45,13 +66,38 @@ export default function Layout() { logo="A Te Szertartásvezetőd" ctaButton={{ text: "Ajánlatkérés", - href: "#contact", + href: "#contact-modal", }} navItems={navItems} />
+ } + title="Foglald le a napodat!" + description="A 2026-os és már a 2027-es naptáram is nyitva!" + > +
e.preventDefault()}> +
+ + +
+
+ + +
+
+ + +
+
+ +