Need to cancel the debounce

This commit is contained in:
Lim Chee Aun 2023-01-17 08:56:13 +08:00
parent 76aeff47ae
commit 8834c03d7a

View file

@ -47,6 +47,7 @@ function StatusPage({ id }) {
});
onScroll();
return () => {
onScroll.cancel();
scrollableRef.current?.removeEventListener('scroll', onScroll);
};
}, [id, uiState !== 'loading']);