Skip to content

Commit

Permalink
feat(campaign): skip avatar shuffling if it does not exceed the max c…
Browse files Browse the repository at this point in the history
…ount
  • Loading branch information
gitwoz committed Oct 29, 2024
1 parent bd087fe commit 321904d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/views/CampaignDetail/SideParticipants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ const SideParticipants = ({ campaign }: SideParticipantsProps) => {
return []
}

if (edges.length <= maxAvatarCount) {
return edges
}

const withAvatars = edges.filter(
({ node }) => node.avatar && node.id !== viewer.id
)
Expand Down

0 comments on commit 321904d

Please sign in to comment.