diff --git a/frontend/components/ProposalList.tsx b/frontend/components/ProposalList.tsx index 7144a948..795a1bae 100644 --- a/frontend/components/ProposalList.tsx +++ b/frontend/components/ProposalList.tsx @@ -463,6 +463,9 @@ export default function ProposalList({ userAddress }: ProposalListProps) { const totalVotesB = b.votesFor + b.votesAgainst; return totalVotesB - totalVotesA; } + case 'ending-soon': + if (a.executed !== b.executed) return a.executed ? 1 : -1; + return a.createdAt - b.createdAt; default: return 0; } @@ -511,6 +514,18 @@ export default function ProposalList({ userAddress }: ProposalListProps) { + {filterParams.sort !== 'newest' && ( +
+ {{ + 'oldest': 'Sorted by earliest created', + 'ending-soon': 'Sorted by active proposals closest to their deadline', + 'highest': 'Sorted by largest funding request', + 'lowest': 'Sorted by smallest funding request', + 'most-votes': 'Sorted by highest total vote count', + }[filterParams.sort]} +
+ )} ++ {SORT_DESCRIPTIONS[selectedSort]} +
+ )} + {isOpen && ( -