made event listener passive
This commit is contained in:
parent
4178d3fd22
commit
efc04989a8
|
@ -16,7 +16,7 @@ export function ScrollToTopButton(props: { className?: string }) {
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener('scroll', onScroll)
|
||||
window.addEventListener('scroll', onScroll, { passive: true })
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('scroll', onScroll)
|
||||
|
|
Loading…
Reference in New Issue
Block a user