aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2020-04-07 00:08:49 +0200
committerBen Beltran <ben@nsovocal.com>2020-04-07 00:08:49 +0200
commit910bdeaeb023ed509452f9ff80bfbbf626b06fbc (patch)
tree1772241591b49c37b96fe9e091280558cb6967cb /index.html
parent636c2ad49bd1a4cfdba7e8c6a75691819cc2fdc1 (diff)
Sort by votes
Diffstat (limited to 'index.html')
-rw-r--r--index.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.html b/index.html
index bc3f8b6..d839fe2 100644
--- a/index.html
+++ b/index.html
@@ -45,7 +45,9 @@
const container = document.getElementById('proposals');
- parsedResponse.result.items.forEach((proposal) => {
+ parsedResponse.result.items
+ .sort((a, b) => b.total_occurrences - a.total_occurrences)
+ .forEach((proposal) => {
container.appendChild(generateProposalHTML(proposal));
});