From d93e8bc250c07ade3d1cf08f49eab0fabe3d4c9d Mon Sep 17 00:00:00 2001 From: dertyp7 Date: Sat, 13 Jan 2024 18:16:49 +0100 Subject: [PATCH] Update scroll threshold in ScrollToTop component --- src/components/ScrollToTop.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ScrollToTop.tsx b/src/components/ScrollToTop.tsx index 6fc8469..47e3c52 100644 --- a/src/components/ScrollToTop.tsx +++ b/src/components/ScrollToTop.tsx @@ -5,7 +5,7 @@ export default function ScrollToTop() { const [isScrolledUp, setIsScrolledUp] = useState(false); const toggleVisibilityAndDirection = () => { - if (window.scrollY < 150) { + if (window.scrollY < 100) { setIsScrolledUp(false); } else { setIsScrolledUp(window.scrollY === 0 ? false : true);