We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3c7664 commit 2155129Copy full SHA for 2155129
users/discord/components/UsersSection.js
@@ -9,19 +9,10 @@ export const UsersSection = ({
9
currentPage,
10
isLoading,
11
}) => {
12
- const debounce = (func, delay) => {
13
- let timeoutId;
14
- return function (...args) {
15
- clearTimeout(timeoutId);
16
- timeoutId = setTimeout(() => {
17
- func.apply(this, args);
18
- }, delay);
19
- };
20
21
-
22
window.addEventListener(
23
'scroll',
24
debounce(() => {
+ console.log('scroll triggered');
25
if (window.innerHeight + window.scrollY >= document.body.offsetHeight) {
26
fetchUsers(activeTab, currentPage + 1);
27
}
0 commit comments