We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 754b0c8 + bc8588c commit 58ebdc0Copy full SHA for 58ebdc0
1 file changed
src/Components/BackToTop.jsx
@@ -40,6 +40,7 @@ const BackToTop = () => {
40
setVisible(window.scrollY > 400);
41
};
42
window.addEventListener("scroll", handleScroll, { passive: true });
43
+ handleScroll();
44
return () => window.removeEventListener("scroll", handleScroll);
45
}, []);
46
0 commit comments