mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-11-07 01:14:57 +05:30
chore: use scrollY
This commit is contained in:
parent
20d0c5fe40
commit
622ee13196
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ export default function ScrollToTopButton() {
|
|||
|
||||
useEffect(() => {
|
||||
const toggleVisibility = () => {
|
||||
setVisible(window.pageYOffset > 100);
|
||||
setVisible(window.scrollY > 100);
|
||||
};
|
||||
|
||||
window.addEventListener('scroll', toggleVisibility);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue