Skip to content

Commit

Permalink
Update sort
Browse files Browse the repository at this point in the history
  • Loading branch information
evmiguel committed Apr 11, 2024
1 parent ebe88e5 commit 857edb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Analysis/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function Analysis({ purchases }: AnalysisProps) {
<span className="inline-block">{formatCurrency(cost)}</span>
</li>
})).sort((a: any, b: any) => {
return parseFloat(b.props.children[1].props.children.slice(1)) - parseFloat(a.props.children[1].props.children.slice(1))
return parseFloat(b.props.children[1].props.children.slice(1).replace(',','')) - parseFloat(a.props.children[1].props.children.slice(1).replace(',',''))
})
}
<li className="flex justify-between border-t-2" key="total"><span className="inline-block font-bold">Total</span><span className="inline-block font-bold">
Expand Down

0 comments on commit 857edb7

Please sign in to comment.