diff --git a/src/components/TransactionsTable/TransactionsTable.js b/src/components/TransactionsTable/TransactionsTable.js index cca1d9b3..f5e7283f 100644 --- a/src/components/TransactionsTable/TransactionsTable.js +++ b/src/components/TransactionsTable/TransactionsTable.js @@ -13,8 +13,11 @@ const TransactionsTable = ({ transactions }) => { const sortedTransactions = transactions ? [...transactions].sort((a, b) => new Date(b.date) - new Date(a.date)) : []; - - const transactionEntries = sortedTransactions.map((transaction) => { + +const uniqueTransactions = []; +const transactionEntries = sortedTransactions.map((transaction) => { + if (!uniqueTransactions.some((t) => t.id === transaction.id)) { + uniqueTransactions.push(transaction); let statusColor = transaction.status === 'credited' ? '#02B15A' : '#E41414'; return ( @@ -24,8 +27,9 @@ const TransactionsTable = ({ transactions }) => { {titleize(transaction.status)} ); - }); - + } +}); + return (