Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
themrphantom committed Oct 30, 2024
1 parent b2d561b commit c5940db
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/src/Components/Admin/Checkout/Checkout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,16 @@ const Checkout = (props: Props) => {
if (checkouts.length === 0) {
return []
}
const entries = [<CheckoutEntry checkout={checkouts[0]} />]
const entries = [[<CheckoutEntry checkout={checkouts[0]} />,checkouts[0].id]]
let lastEntry = checkouts[0]
checkouts.slice(1).forEach(value => {
entries.push(<CheckoutEntry prevCheckout={lastEntry} checkout={value} />);
entries.push([<CheckoutEntry prevCheckout={lastEntry} checkout={value} />,value.id]);
lastEntry = value;
})
return entries.reverse()

entries.sort((a:any,b:any) => a[1] - b[1])

return entries.map(value => value[0])
}


Expand Down

0 comments on commit c5940db

Please sign in to comment.