Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Conversation

@Ishikabaid
Copy link
Contributor

@Ishikabaid Ishikabaid commented Aug 1, 2022

What is the change?

Closes #391
Implemented infinite scroll for new members

Is it bug?

No

*Dev Tested?

Yes

*Tested on:

Platforms

  • Web

Browsers

  • Chrome
  • Safari
  • Firefox

Before / After Change Screenshots

Untitled.1.mp4

@ankushdharkar ankushdharkar marked this pull request as draft August 2, 2022 00:03
@Ishikabaid Ishikabaid marked this pull request as ready for review August 4, 2022 15:02
@Ishikabaid Ishikabaid marked this pull request as draft August 23, 2022 16:16
Comment on lines +46 to +47
useEffect(() => {
fetchNewMembers();
}, [newMembersList]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add the fetchNewMembers function in the dependency array as pointed out in the warning by GitHub actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please tell me why we need to provide this function in the dependency array?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the hook is dependent on the function, I thought we can add it. what do you think @sumitd94 @swarajpure ?

const { dev } = query;
const [isOptionKey, setIsOptionKey] = useState(false);
const [newMembers, setNewMembers] = useState([]);
const [scrollCount, setScrollCount] = useState(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this scroll count?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this count to update the array of new members to show after every scroll and we are using it inside fetchNewMembers function.

@Ishikabaid Ishikabaid marked this pull request as ready for review September 1, 2022 06:21
@vercel
Copy link

vercel bot commented Sep 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
website-members ✅ Ready (Inspect) Visit Preview Sep 16, 2022 at 6:50AM (UTC)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite scrolling for new users display

5 participants