diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index d02b849..dd2ee15 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -2,62 +2,44 @@ 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 { Instagram, Linkedin, Twitter } from "lucide-react"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; export default function Layout() { const navItems = [ - { - "name": "About", "href": "#about" - }, - { - "name": "Services", "href": "#services" - }, - { - "name": "Testimonials", "href": "#testimonials" - }, - { - "name": "FAQ", "href": "#faq" - }, - { - "name": "Hero", "href": "#hero" - }, - { - "name": "Metrics", "href": "#metrics" - }, - { - "name": "Contact", "href": "#contact" - } -]; + { "name": "About", "href": "#about" }, + { "name": "Services", "href": "#services" }, + { "name": "Testimonials", "href": "#testimonials" }, + { "name": "FAQ", "href": "#faq" }, + { "name": "Hero", "href": "#hero" }, + { "name": "Metrics", "href": "#metrics" }, + { "name": "Contact", "href": "#contact" } + ]; return ( + logo="Dermatology Specialist" + logoImageSrc="http://img.b2bpic.net/free-vector/logo-with-abstract-purple-face_1017-1085.jpg" + ctaButton={{ text: "Book Consultation", href: "#contact" }} + navItems={navItems} + />
+ brand="London Dermatology Specialist" + copyright="© 2024 London Dermatology Specialist. All rights reserved." + socialLinks={[ + { icon: "Twitter", href: "#" }, + { icon: "Instagram", href: "#" }, + { icon: "Linkedin", href: "#" }, + ]} + />
); diff --git a/src/components/sections/hero/HeroExpand.tsx b/src/components/sections/hero/HeroExpand.tsx index dedb1fc..425023d 100644 --- a/src/components/sections/hero/HeroExpand.tsx +++ b/src/components/sections/hero/HeroExpand.tsx @@ -1,146 +1,17 @@ -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 }; +interface HeroExpandProps { 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 }: HeroExpandProps) { + const ref = useRef(null); useEffect(() => { - const expandTimer = setTimeout(() => setExpanded(true), 600); - const hideTimer = setTimeout(() => { - setShowLoader(false); - onComplete?.(); - }, 1500); - return () => { - clearTimeout(expandTimer); - clearTimeout(hideTimer); - }; - }, []); + if (onComplete) { + onComplete(); + } + }, [onComplete]); - return ( - <> - - {showLoader && ( - - - - - - )} - - -
- - - - -
- -
-
- - {title} - - -
- - - - - - - - - - -
-
-
-
- - ); -}; - -export default HeroExpand; + return
; +}