Skip to content

Commit

Permalink
sort result panel list
Browse files Browse the repository at this point in the history
  • Loading branch information
subject026 committed Sep 3, 2024
1 parent 67b59e1 commit e2d6001
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/app/governance/components/ResultsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ export function ResultsPanel({
</h3>
<div className="grid grid-cols-1 gap-4">
{distribution.status === "SUCCESS" &&
distribution.data[0].map((account, i) => (
<ResultsProject
key={`project_result_${account}`}
address={account}
projectPoints={distribution.data[1][i]}
totalPoints={totalPoints}
/>
))}
distribution.data[0]
.toSorted(
(a, b) => projectsMeta[a].order - projectsMeta[b].order
)
.map((account, i) => (
<ResultsProject
key={`project_result_${account}`}
address={account}
projectPoints={distribution.data[1][i]}
totalPoints={totalPoints}
/>
))}
</div>
</div>
</div>
Expand Down

0 comments on commit e2d6001

Please sign in to comment.