From d310a153c3b28f1b5f6a45aac101d9017966a34f Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 14 Jun 2026 13:49:28 +0000 Subject: [PATCH 1/2] Update src/components/Layout.tsx --- src/components/Layout.tsx | 45 ++++++++++++--------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index ca9a172..2b51b18 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -2,34 +2,20 @@ 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": "Menu", "href": "#menu" - }, - { - "name": "About", "href": "#about" - }, - { - "name": "Pricing", "href": "#pricing" - }, - { - "name": "FAQ", "href": "#faq" - }, - { - "name": "Hero", "href": "#hero" - }, - { - "name": "Metrics", "href": "#metrics" - }, - { - "name": "Testimonials", "href": "#testimonials" - } -]; + { "name": "Hero", "href": "#hero" }, + { "name": "About", "href": "#about" }, + { "name": "Menu", "href": "#menu" }, + { "name": "Pricing", "href": "#pricing" }, + { "name": "Metrics", "href": "#metrics" }, + { "name": "Testimonials", "href": "#testimonials" }, + { "name": "FAQ", "href": "#faq" }, + { "name": "Contact", "href": "#contact" } + ]; return ( @@ -39,7 +25,7 @@ export default function Layout() { logo="Tasty Stall" logoImageSrc="https://storage.googleapis.com/webild/default/no-image.jpg?id=dquoks" ctaButton={{ - text: "Order Now", href: "#contact"}} + text: "Order Now", href: "#contact"}} navItems={navItems} /> @@ -51,15 +37,12 @@ export default function Layout() { brand="Tasty Stall" copyright="© 2024 Tasty Stall Inc. All rights reserved." socialLinks={[ - { - icon: "Instagram", href: "#"}, - { - icon: "Facebook", href: "#"}, - { - icon: "Twitter", href: "#"}, + { icon: "Instagram", href: "#" }, + { icon: "Facebook", href: "#" }, + { icon: "Twitter", href: "#" } ]} /> ); -} +} \ No newline at end of file -- 2.49.1 From a646d2c50e05380026caaa8116fc154ba578076a Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 14 Jun 2026 13:49:28 +0000 Subject: [PATCH 2/2] Update src/components/sections/hero/HeroVideoExpand.tsx --- .../sections/hero/HeroVideoExpand.tsx | 151 ++---------------- 1 file changed, 13 insertions(+), 138 deletions(-) diff --git a/src/components/sections/hero/HeroVideoExpand.tsx b/src/components/sections/hero/HeroVideoExpand.tsx index e0e7f08..0e860c8 100644 --- a/src/components/sections/hero/HeroVideoExpand.tsx +++ b/src/components/sections/hero/HeroVideoExpand.tsx @@ -1,146 +1,21 @@ -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 HeroVideoExpandProps = { - title: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: 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({ onComplete }: { onComplete: () => void }) { + const videoRef = useRef(null); useEffect(() => { - const expandTimer = setTimeout(() => setExpanded(true), 600); - const hideTimer = setTimeout(() => { - setShowLoader(false); - onComplete?.(); - }, 1500); + const video = videoRef.current; + if (video) { + video.onended = onComplete; + } return () => { - clearTimeout(expandTimer); - clearTimeout(hideTimer); + if (video) video.onended = null; }; - }, []); + }, [onComplete]); return ( - <> - - {showLoader && ( - - - - - - )} - - -
- - - - -
- -
-
- - {title} - - -
- - - - - - - - - - -
-
-
-
- + ); -}; - -export default HeroVideoExpand; +} \ No newline at end of file -- 2.49.1