From f5f4494897cadd4eb23ae49b96ae07aa4b142a38 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 25 Mar 2026 20:34:56 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 120 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 106 insertions(+), 14 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index bfe933c..f8e00ed 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,8 @@ "use client"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; -import ReactLenis from "lenis/react"; +import ReactLenis, { useLenis } from "lenis/react"; +import { useState } from 'react'; import ContactCTA from '@/components/sections/contact/ContactCTA'; import FaqDouble from '@/components/sections/faq/FaqDouble'; import FeatureCardTwentyThree from '@/components/sections/feature/FeatureCardTwentyThree'; @@ -10,9 +11,38 @@ import HeroLogoBillboardSplit from '@/components/sections/hero/HeroLogoBillboard import MetricCardTwo from '@/components/sections/metrics/MetricCardTwo'; import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline'; import TestimonialCardTwo from '@/components/sections/testimonial/TestimonialCardTwo'; +import Input from '@/components/form/Input'; import { MessageCircle, Sparkles, Star, Wrench } from "lucide-react"; export default function LandingPage() { + const lenis = useLenis(); + + const scrollToSection = (sectionId) => { + const cleanId = String(sectionId).replace(/^#/, ""); + if (lenis) { + lenis.scrollTo(`#${cleanId}`, { offset: 0 }); + } else { + const element = document.getElementById(cleanId); + if (!element) return; + element.scrollIntoView({ behavior: "smooth", block: "start" }); + } + }; + + const [name, setName] = useState(""); + const [email, setEmail] = useState(""); + const [phone, setPhone] = useState(""); + const [message, setMessage] = useState(""); + + const handleSubmitQuote = (e) => { + e.preventDefault(); + console.log({ name, email, phone, message }); + alert("Quote request submitted! We'll be in touch soon."); + setName(""); + setEmail(""); + setPhone(""); + setMessage(""); + }; + return ( scrollToSection("services")}, { - name: "Process", id: "process"}, + name: "Process", onClick: () => scrollToSection("process")}, { - name: "Reviews", id: "reviews"}, + name: "Reviews", onClick: () => scrollToSection("reviews")}, { - name: "FAQ", id: "faq"}, + name: "FAQ", onClick: () => scrollToSection("faq")}, ]} brandName="Results Roofing" button={{ - text: "Free Estimate", href: "#quote"}} + text: "Free Estimate", onClick: () => scrollToSection("quote")}} animateOnLoad={true} /> @@ -54,9 +84,9 @@ export default function LandingPage() { description="Roofing that feels premium before the first shingle goes on. Results Roofing helps Dallas homeowners with inspections, repairs, replacements, and insurance guidance through a polished, high-trust experience from start to finish." buttons={[ { - text: "Get My Free Roof Inspection", href: "#quote"}, + text: "Get My Free Roof Inspection", onClick: () => scrollToSection("quote")}, { - text: "See Why Dallas Trusts Us", href: "#reviews"}, + text: "See Why Dallas Trusts Us", onClick: () => scrollToSection("reviews")}, ]} layoutOrder="default" imageSrc="http://img.b2bpic.net/free-photo/chisinau-arena-sunset-moldova_1268-16015.jpg" @@ -183,7 +213,7 @@ export default function LandingPage() { description="Whether you need an inspection, a fast repair, or a full replacement, Results Roofing is positioned here as the premium choice that still feels approachable." buttons={[ { - text: "Get a Free Estimate", href: "#quote"}, + text: "Get a Free Estimate", onClick: () => scrollToSection("quote")}, { text: "Call Results Roofing", href: "tel:+12145550199"}, ]} @@ -193,6 +223,68 @@ export default function LandingPage() { /> +
+
+

Get Your Free Estimate

+

Fill out the form below and we'll get back to you shortly.

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ +