Skip to content

Commit

Permalink
add sort by eta
Browse files Browse the repository at this point in the history
  • Loading branch information
pdp2121 committed Nov 21, 2023
1 parent 3ac81d0 commit 0c9f417
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/containers/Amendments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const Amendments = () => {
.then((resp) => resp.data.amendments)
.then((amendments) =>
amendments.sort((a, b) => {
if (a.eta && !b.eta) return -1
if (!a.eta && b.eta) return 1
if (a.voted && !b.voted) return -1
if (!a.voted && b.voted) return 1
return 0
Expand Down

0 comments on commit 0c9f417

Please sign in to comment.