From b73a5eaaf1b82b3bac0f485b8c66df1954cbf578 Mon Sep 17 00:00:00 2001 From: bender Date: Mon, 22 Jun 2026 14:36:10 +0000 Subject: [PATCH 1/2] Update src/components/Layout.tsx --- src/components/Layout.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index a6ab2ae..affc366 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -2,7 +2,6 @@ import FooterMinimal from '@/components/sections/footer/FooterMinimal'; import NavbarFloatingLogo from '@/components/ui/NavbarFloatingLogo'; import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; import SiteBackgroundSlot from "@/components/ui/SiteBackgroundSlot"; -import { Facebook, Instagram, Linkedin } from "lucide-react"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; @@ -25,7 +24,7 @@ export default function Layout() { logo="South Florida Roofers" logoImageSrc="http://img.b2bpic.net/free-vector/modern-business-card-design_1048-7412.jpg" ctaButton={{ - text: "Get a Quote", href: "#contact"}} + text: "Get a Quote", href: "#contact"}} navItems={navItems} /> -- 2.49.1 From e31b725b6826618d8c4404159ec728c19ea03ce7 Mon Sep 17 00:00:00 2001 From: bender Date: Mon, 22 Jun 2026 14:36:10 +0000 Subject: [PATCH 2/2] Update src/components/sections/hero/HeroExpand.tsx --- src/components/sections/hero/HeroExpand.tsx | 156 ++------------------ 1 file changed, 14 insertions(+), 142 deletions(-) diff --git a/src/components/sections/hero/HeroExpand.tsx b/src/components/sections/hero/HeroExpand.tsx index dedb1fc..adf6d72 100644 --- a/src/components/sections/hero/HeroExpand.tsx +++ b/src/components/sections/hero/HeroExpand.tsx @@ -1,146 +1,18 @@ -import { useEffect, useRef, useState } from "react"; -import { AnimatePresence, motion, useScroll, useTransform } from "motion/react"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import AutoFillText from "@/components/ui/AutoFillText"; -import { useButtonClick } from "@/hooks/useButtonClick"; +import { useEffect, useRef } from 'react'; -const StaggerText = ({ text }: { text: string }) => ( - - {[...text].map((char, index) => ( - - {char} - - ))} - -); - -type HeroExpandProps = { - title: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; - onComplete?: () => void; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -const HeroExpand = ({ - title, - videoSrc, - imageSrc, - primaryButton, - secondaryButton, - onComplete, -}: HeroExpandProps) => { - const [showLoader, setShowLoader] = useState(true); - const [expanded, setExpanded] = useState(false); - const handlePrimaryClick = useButtonClick(primaryButton.href); - const handleSecondaryClick = useButtonClick(secondaryButton.href); - - const sectionRef = useRef(null); - const { scrollYProgress } = useScroll({ - target: sectionRef, - offset: ["start start", "end start"], - }); - const videoY = useTransform(scrollYProgress, [0, 1], ["0px", "150px"]); - const videoScale = useTransform(scrollYProgress, [0, 1], [1, 1.1]); +export default function HeroExpand({ + onComplete +}: { + onComplete: () => void +}) { + const effectRef = useRef(false); useEffect(() => { - const expandTimer = setTimeout(() => setExpanded(true), 600); - const hideTimer = setTimeout(() => { - setShowLoader(false); - onComplete?.(); - }, 1500); - return () => { - clearTimeout(expandTimer); - clearTimeout(hideTimer); - }; - }, []); + if (!effectRef.current) { + effectRef.current = true; + onComplete(); + } + }, [onComplete]); - return ( - <> - - {showLoader && ( - - - - - - )} - - -
- - - - -
- -
-
- - {title} - - -
- - - - - - - - - - -
-
-
-
- - ); -}; - -export default HeroExpand; + return
; +} -- 2.49.1