Flush instead of cancel

This commit is contained in:
Lim Chee Aun 2023-01-30 19:36:47 +08:00
parent 0a4c3069dd
commit 1fed35f674

View file

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