diff --git a/src/app/page.tsx b/src/app/page.tsx index 8a4f3b5..5089e1e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -13,6 +13,22 @@ import FooterMedia from '@/components/sections/footer/FooterMedia'; import { Clock, DollarSign, Shield, Star, Zap, Wrench } from 'lucide-react'; export default function LandingPage() { + const handleHeroButtonClick = (href: string) => { + if (href.startsWith('tel:')) { + window.location.href = href; + } else if (href.startsWith('#')) { + const element = document.getElementById(href.substring(1)); + if (element) { + element.scrollIntoView({ behavior: 'smooth' }); + } + } + }; + + const handleContactSubmit = (data: Record) => { + console.log('Form submitted:', data); + // Handle form submission logic here + }; + return ( handleHeroButtonClick("tel:0641437036") }, + { text: "Schedule Service", href: "#contact", onClick: () => handleHeroButtonClick("#contact") } ]} mediaAnimation="slide-up" buttonAnimation="slide-up" @@ -93,7 +109,12 @@ export default function LandingPage() { mediaAnimation="slide-up" buttonAnimation="slide-up" tagAnimation="slide-up" - buttons={[{ text: "Get Help Today", href: "tel:0641437036" }]} + buttons={[ + { + text: "Get Help Today", + href: "tel:0641437036", onClick: () => handleHeroButtonClick("tel:0641437036") + } + ]} imagePosition="right" ariaLabel="About R & R Electrical section" /> @@ -247,6 +268,7 @@ export default function LandingPage() { mediaAnimation="slide-up" mediaPosition="right" buttonText="Request Service" + onSubmit={handleContactSubmit} ariaLabel="Contact form - R & R Electrical" /> @@ -285,4 +307,4 @@ export default function LandingPage() { ); -} +} \ No newline at end of file