From e7a046547f4cd56d63c068f20f2e6208f28b5a77 Mon Sep 17 00:00:00 2001 From: bender Date: Mon, 15 Jun 2026 10:54:25 +0000 Subject: [PATCH 1/2] Update src/components/Layout.tsx --- src/components/Layout.tsx | 43 ++++++++++++--------------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 28f5910..3c33032 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -2,34 +2,19 @@ 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, Twitter } from "lucide-react"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; export default function Layout() { const navItems = [ - { - "name": "Home", "href": "#home" - }, - { - "name": "Services", "href": "#services" - }, - { - "name": "Products", "href": "#products" - }, - { - "name": "About", "href": "#about" - }, - { - "name": "Team", "href": "#team" - }, - { - "name": "Testimonials", "href": "#testimonials" - }, - { - "name": "Faq", "href": "#faq" - } -]; + { "name": "Home", "href": "#home" }, + { "name": "Services", "href": "#services" }, + { "name": "Products", "href": "#products" }, + { "name": "About", "href": "#about" }, + { "name": "Team", "href": "#team" }, + { "name": "Testimonials", "href": "#testimonials" }, + { "name": "Faq", "href": "#faq" } + ]; return ( @@ -39,7 +24,8 @@ export default function Layout() { logo="QuickSeva" logoImageSrc="https://storage.googleapis.com/webild/users/user_3FAakrGyZd7VBV36Fpvs1I0qz8k/uploaded-1781520761041-gy58vkal.png" ctaButton={{ - text: "Book Now", href: "#contact"}} + text: "Book Now", href: "#contact" + }} navItems={navItems} /> @@ -51,12 +37,9 @@ export default function Layout() { brand="QuickSeva" copyright="© 2024 QuickSeva Technologies. All rights reserved." socialLinks={[ - { - icon: "Facebook"}, - { - icon: "Instagram"}, - { - icon: "Twitter"}, + { icon: "Facebook" }, + { icon: "Instagram" }, + { icon: "Twitter" } ]} /> -- 2.49.1 From 3ad97895acb3121427247a060a0c4eac8a9e8b38 Mon Sep 17 00:00:00 2001 From: bender Date: Mon, 15 Jun 2026 10:54:26 +0000 Subject: [PATCH 2/2] Update src/components/sections/hero/HeroVideoExpand.tsx --- .../sections/hero/HeroVideoExpand.tsx | 176 +++++------------- 1 file changed, 42 insertions(+), 134 deletions(-) diff --git a/src/components/sections/hero/HeroVideoExpand.tsx b/src/components/sections/hero/HeroVideoExpand.tsx index e0e7f08..4adc038 100644 --- a/src/components/sections/hero/HeroVideoExpand.tsx +++ b/src/components/sections/hero/HeroVideoExpand.tsx @@ -1,146 +1,54 @@ -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 { useState, useEffect } from 'react'; +import { Play, X } from 'lucide-react'; -const StaggerText = ({ text }: { text: string }) => ( - - {[...text].map((char, index) => ( - - {char} - - ))} - -); - -type HeroVideoExpandProps = { +interface HeroVideoExpandProps { title: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; + description: string; + videoSrc: string; onComplete?: () => void; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); +} -const HeroVideoExpand = ({ - title, - videoSrc, - imageSrc, - primaryButton, - secondaryButton, - onComplete, -}: HeroVideoExpandProps) => { - 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 HeroVideoExpand({ title, description, videoSrc, onComplete }: HeroVideoExpandProps) { + const [isOpen, setIsOpen] = useState(false); useEffect(() => { - const expandTimer = setTimeout(() => setExpanded(true), 600); - const hideTimer = setTimeout(() => { - setShowLoader(false); - onComplete?.(); - }, 1500); - return () => { - clearTimeout(expandTimer); - clearTimeout(hideTimer); - }; - }, []); + if (isOpen && onComplete) { + onComplete(); + } + }, [isOpen, onComplete]); return ( - <> - - {showLoader && ( - +
+

{title}

+

{description}

+ +
+ + {isOpen && ( +
+ +
+