"use client" import { useState, useEffect } from "react" export function ScrollProgress() { const [scrollProgress, setScrollProgress] = useState(0) useEffect(() => { const handleScroll = () => { const totalHeight = document.documentElement.scrollHeight - window.innerHeight const progress = (window.scrollY / totalHeight) * 100 setScrollProgress(Math.min(progress, 100)) } window.addEventListener("scroll", handleScroll) return () => window.removeEventListener("scroll", handleScroll) }, []) return (