From 1c5878e70d821ba22fa296fc4b486106f6f42624 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 29 Apr 2026 01:19:59 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index a9938d0..d415900 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -13,7 +13,13 @@ import TestimonialCardThirteen from '@/components/sections/testimonial/Testimoni export default function LandingPage() { const scrollToId = (id: string) => { - const target = document.getElementById(id.replace(/^#+/, '')); + if (id.startsWith('http') || id.startsWith('tel:') || id.startsWith('mailto:')) { + window.open(id, '_blank'); + return; + } + + const targetId = id.replace(/^#+/, ''); + const target = document.getElementById(targetId); if (target) { target.scrollIntoView({ behavior: 'smooth' }); } @@ -59,7 +65,7 @@ export default function LandingPage() { ]} buttons={[ { text: "Get a Free Inspection", onClick: () => scrollToId("#contact") }, - { text: "Call Now: (262) 546-9589", href: "tel:2625469589" }, + { text: "Call Now: (262) 546-9589", onClick: () => scrollToId("tel:2625469589") }, ]} imageSrc="http://img.b2bpic.net/free-photo/low-angle-artistic-architectural-design_23-2148252774.jpg?_wi=2" avatars={[ @@ -182,8 +188,8 @@ export default function LandingPage() { title="Ready for a Roof You Can Rely On?" description="Don't wait for minor issues to cause major damage. Get your free, no-obligation inspection today." buttons={[ - { text: "Schedule Your Free Inspection", onClick: () => scrollToId("contact") }, - { text: "Call (262) 546-9589", href: "tel:2625469589" }, + { text: "Schedule Your Free Inspection", onClick: () => scrollToId("#contact") }, + { text: "Call (262) 546-9589", onClick: () => scrollToId("tel:2625469589") }, ]} /> @@ -212,4 +218,4 @@ export default function LandingPage() { ); -} +} \ No newline at end of file -- 2.49.1