diff --git a/src/components/ScrollToTopButton.tsx b/src/components/ScrollToTopButton.tsx index fcd7e74..fdbc755 100644 --- a/src/components/ScrollToTopButton.tsx +++ b/src/components/ScrollToTopButton.tsx @@ -7,7 +7,7 @@ export default function ScrollToTopButton() { useEffect(() => { const toggleVisibility = () => { - setVisible(window.pageYOffset > 100); + setVisible(window.scrollY > 100); }; window.addEventListener('scroll', toggleVisibility);