Skip to content

Commit 4991b6e

Browse files
committed
chore: fix react key
1 parent 6bdaeaf commit 4991b6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/features/transactions/pages/group-page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,15 @@ function TransactionRow({
153153
</div>
154154
{accounts.map((_, index) => {
155155
if (index < arrow.from || index > arrow.to) return <div key={index}></div>
156-
if (index === arrow.from && index === arrow.to) return <DisplaySelfTransaction />
157-
if (index === arrow.from) return <DisplayArrow arrow={arrow} />
156+
if (index === arrow.from && index === arrow.to) return <DisplaySelfTransaction key={index} />
157+
if (index === arrow.from) return <DisplayArrow key={index} arrow={arrow} />
158158
else return null
159159
})}
160160

161161
{hasChildren &&
162162
transaction.transactions?.map((childTransaction, index, arr) => (
163163
<TransactionRow
164+
key={index}
164165
transaction={childTransaction}
165166
hasChildren={childTransaction.transactions && childTransaction.transactions.length > 0}
166167
hasParent={true}
@@ -280,6 +281,7 @@ export function GroupPage() {
280281
</div>
281282
{group.transactions.map((transaction, index, arr) => (
282283
<TransactionRow
284+
key={index}
283285
transaction={transaction}
284286
hasChildren={transaction.transactions && transaction.transactions.length > 0}
285287
hasParent={false}

0 commit comments

Comments
 (0)