"use client"; import { motion, useIsPresent } from "motion/react"; import { usePathname, useSearchParams } from "next/navigation"; import { useEffect, useState } from "react"; /** * Global smooth progress indicator for page transitions. * Uses motion/react for high-performance 60fps animations. */ export function GlobalProgressBar() { const pathname = usePathname(); const searchParams = useSearchParams(); const [isLoading, setIsLoading] = useState(false); const isPresent = useIsPresent(); // biome-ignore lint/correctness/useExhaustiveDependencies: Route changes intentionally restart the indicator timer. useEffect(() => { setIsLoading(true); const timer = setTimeout(() => { setIsLoading(false); }, 400); return () => clearTimeout(timer); }, [pathname, searchParams]); if (!isLoading && isPresent) return null; return (