Skip to content

CAS-192 - fix avatars missing from community header area#126

Merged
dbslone merged 15 commits intomainfrom
cas-192
Jul 11, 2022
Merged

CAS-192 - fix avatars missing from community header area#126
dbslone merged 15 commits intomainfrom
cas-192

Conversation

@germanurrus
Copy link
Copy Markdown
Contributor

@germanurrus germanurrus commented Jul 11, 2022

Avatars were using the admin list, now they are using all users in the community list to fill up 6 avatars.
Screen Shot 2022-07-11 at 17 06 03

const onUserJoinCommunity = async () => {
if (members?.length < 6) {
await queryClient.invalidateQueries(queryKey);
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if there are less than 6 avatars on community page there's room to show another one, pull members again and show then

if (authors?.find((author) => author.addr === addr)) {
await reFectAuthors();
if (members?.find((member) => member.addr === addr)) {
await queryClient.invalidateQueries(queryKey);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if user removed was on the 6 avatars shown then refresh the list

@germanurrus germanurrus self-assigned this Jul 11, 2022
@germanurrus germanurrus marked this pull request as ready for review July 11, 2022 20:07

const { data, pagination, loading, fetchMore } = useCommunityMembers({
const { data, pagination, isLoading, fetchNextPage } = useCommunityMembers({
communityId,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

update done bc useCommunityMembers uses react-query

@dbslone dbslone merged commit 939b4ba into main Jul 11, 2022
@dbslone dbslone deleted the cas-192 branch July 11, 2022 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants