Skip to content

Commit

Permalink
show voters count in Explore page (solana-labs#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xShuk authored Jun 10, 2024
1 parent 1d9dc88 commit a4131c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pages/dao/[symbol]/proposal/[pk]/explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export default function Explore() {
proposal?.account.voteType !== VoteType.SINGLE_CHOICE &&
proposal?.account.accountType === GovernanceAccountType.ProposalV2

const voterCount = records.filter(r => r.voteType !== 1).length

return (
<div className="bg-bkg-2 rounded-lg p-4 space-y-3 md:p-6">
<button
Expand All @@ -67,7 +69,8 @@ export default function Explore() {
<h1 className="mr-2">{proposal?.account.name}</h1>
<ProposalStateBadge proposal={proposal.account} />
</div>
<div className="mb-4 mt-16 flex justify-between">
<h4>Number of Voters: {voterCount}</h4>
<div className="mb-4 mt-12 flex justify-between">
<h3 className="">Top Voters</h3>
</div>
<div
Expand Down

0 comments on commit a4131c0

Please sign in to comment.