import { useState, useEffect, useRef } from "react"; import { useLocation } from "wouter"; import { Button } from "@/components/ui/button"; import { ArrowRight, DollarSign, IndianRupee } from "lucide-react"; import heroVideo from "@assets/generated_videos/abstract_finance_visualization_video.mp4"; import StrategySelectorModal from "./StrategySelectorModal"; type HeroSectionProps = { onExploreStrategies: () => void; }; export default function HeroSection({ onExploreStrategies }: HeroSectionProps) { const containerRef = useRef(null); const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); const [isLoaded, setIsLoaded] = useState(false); const [scrollY, setScrollY] = useState(0); const [, navigate] = useLocation(); useEffect(() => { setIsLoaded(true); }, []); useEffect(() => { const handleScroll = () => { setScrollY(window.scrollY); }; window.addEventListener("scroll", handleScroll, { passive: true }); return () => window.removeEventListener("scroll", handleScroll); }, []); useEffect(() => { const handleMouseMove = (e: MouseEvent) => { if (!containerRef.current) return; const rect = containerRef.current.getBoundingClientRect(); const x = (e.clientX - rect.left - rect.width / 2) / rect.width; const y = (e.clientY - rect.top - rect.height / 2) / rect.height; setMousePosition({ x: x * 30, y: y * 30 }); }; const container = containerRef.current; container?.addEventListener("mousemove", handleMouseMove); return () => container?.removeEventListener("mousemove", handleMouseMove); }, []); const parallaxY = scrollY * 0.5; const videoScale = 1 + scrollY * 0.0003; const videoOpacity = Math.max(0.4 - scrollY * 0.0005, 0.15); return (
{[...Array(25)].map((_, i) => (
))}

Invest with
Clarity

Simple, disciplined strategies for long-term wealth building. No noise. Just steady growth. test for the auto deployment by quantfortune team

); }