Skip to content

Commit e7285d7

Browse files
committed
fix: defender key
1 parent 51a53cd commit e7285d7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/features/gym/GymPopup.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ function DefendersModal({ gym, onClose }) {
420420
// Original detailed defender display
421421
<>
422422
<Grid container direction="column" spacing={1}>
423-
{defenders.map((def, index) => {
423+
{defenders.map((def) => {
424424
const fullCP = def.cp_when_deployed
425425
const decayTime =
426426
72 *
@@ -446,9 +446,7 @@ function DefendersModal({ gym, onClose }) {
446446
const primaryTextStyles = defenderStyles.primaryText || {}
447447
const secondaryTextStyles = defenderStyles.secondaryText || {}
448448
const iconStyles = defenderStyles.icon || {}
449-
const rowKey = def.pokemon_id
450-
? `${def.pokemon_id}-${index}`
451-
: `${index}`
449+
const rowKey = `${def.pokemon_id}-${def.deployed_ms}`
452450
const rowContent = (
453451
<DefenderRowLayout
454452
borderColor={borderColor}

0 commit comments

Comments
 (0)