Skip to content

Commit

Permalink
fix: only get top 3 users
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jan 18, 2024
1 parent c824fcd commit 184832f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/components/utils/datahub/active-staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,18 @@ export async function getTopUsers(): Promise<TopUsers> {
})

return {
creators: res.activeStakingCreatorsRankedBySuperLikesForPeriod.map(({ address, count }) => ({
address,
superLikesCount: count,
})),
stakers: res.activeStakingStakersRankedBySuperLikesForPeriod.map(({ address, count }) => ({
address,
superLikesCount: count,
})),
creators: res.activeStakingCreatorsRankedBySuperLikesForPeriod
.slice(0, 3)
.map(({ address, count }) => ({
address,
superLikesCount: count,
})),
stakers: res.activeStakingStakersRankedBySuperLikesForPeriod
.slice(0, 3)
.map(({ address, count }) => ({
address,
superLikesCount: count,
})),
}
}
// MUTATIONS
Expand Down

0 comments on commit 184832f

Please sign in to comment.