diff --git a/sweepy-ui/src/components/SweepstakeTable.jsx b/sweepy-ui/src/components/SweepstakeTable.jsx index 37ebb55..d33108f 100644 --- a/sweepy-ui/src/components/SweepstakeTable.jsx +++ b/sweepy-ui/src/components/SweepstakeTable.jsx @@ -7,6 +7,10 @@ function SweepstakeTable({ data }) { setExpandedRow(expandedRow === index ? null : index); }; + const sortedParticipants = [...data.participants].sort((a, b) => { + return parseFloat(b.equity) - parseFloat(a.equity); + }); + return (
@@ -17,7 +21,7 @@ function SweepstakeTable({ data }) { - {data.participants.map((p, index) => ( + {sortedParticipants.map((p, index) => ( toggleRow(index)}>
{p.name}