Skip to content

Commit

Permalink
Merge pull request #1412 from oasisprotocol/mz/fixKey
Browse files Browse the repository at this point in the history
Fix React duplicated key warning in transactions list
  • Loading branch information
buberdds authored May 14, 2024
2 parents 454f3eb + f844885 commit 409f2c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1412.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix React duplicated key warning in transactions list
2 changes: 1 addition & 1 deletion src/app/components/Transactions/ConsensusTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ConsensusTransactions: FC<ConsensusTransactionsProps> = ({
: []),
]
const tableRows = transactions?.map(transaction => ({
key: transaction.hash,
key: `${transaction.hash}${transaction.index}`,
data: [
{
content: <StatusIcon success={transaction.success} error={transaction.error} />,
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Transactions/RuntimeTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const RuntimeTransactions: FC<TransactionsProps> = ({
const tableRows = transactions?.map(transaction => {
const targetAddress = transaction.to_eth || transaction.to
return {
key: transaction.hash,
key: `${transaction.hash}${transaction.index}`,
data: [
{
content: <StatusIcon success={transaction.success} error={transaction.error} />,
Expand Down

0 comments on commit 409f2c3

Please sign in to comment.